diff --git a/README.md b/README.md index d01ea3b..a6feb4c 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Mini-XML provides the following functionality: Mini-XML doesn't do validation or other types of processing on the data based upon schema files or other sources of definition information. +> Note: Version 3.0 hides the definition of the `mxml_node_t` structure, +> requiring the use of the various accessor functions that were introduced in +> version 2.0. + ## Building Mini-XML @@ -62,19 +66,19 @@ against it. ## Documentation The documentation is available in the `doc` subdirectory in the files -`mxml.html` (HTML) and `mxml.pdf` (PDF). You can also look at the -`testmxml.c` and `mxmldoc.c` source files for examples of using Mini-XML. +`mxml.html` (HTML) and `mxml.epub` (EPUB). You can also look at the +`testmxml.c` source file for examples of using Mini-XML. Mini-XML provides a single header file which you include: #include -Nodes are defined by the `mxml_node_t` structure; the `type` member defines the -node type (`element`, `integer`, `opaque`, `real`, or `text`) which determines -which value you want to look at in the `value` union. New nodes can be created -using the `mxmlNewElement()`, `mxmlNewInteger()`, `mxmlNewOpaque()`, -`mxmlNewReal()`, and `mxmlNewText()` functions. Only elements can have child -nodes, and the top node must be an element, usually "?xml". +Nodes (elements, comments, processing directives, integers, opaque strings, real +numbers, and text strings) are represented by `mxml_node_t` objects. New nodes +can be created using the `mxmlNewElement()`, `mxmlNewInteger()`, +`mxmlNewOpaque()`, `mxmlNewReal()`, and `mxmlNewText()` functions. Only +elements can have child nodes, and the top node must be the "?xml" processing +directive. You load an XML file using the `mxmlLoadFile()` function: @@ -155,7 +159,7 @@ element using an XPath: mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar"); The `mxmlGetInteger()`, `mxmlGetOpaque()`, `mxmlGetReal()`, and -`mxmlGetText()` functions retrieve the value from a node: +`mxmlGetText()` functions retrieve the corresponding value from a node: mxml_node_t *node; @@ -177,9 +181,8 @@ or the entire tree: ## Getting Help And Reporting Problems -The Mini-XML project page provides access to the Github issue tracking page: - - https://www.msweet.org/mxml +The [Mini-XML project page](https://www.msweet.org/mxml) provides access to the +current version of this software, documentation, and Github issue tracking page. ## Legal Stuff diff --git a/doc/body.md b/doc/body.md index 3cd1a17..5028f4c 100644 --- a/doc/body.md +++ b/doc/body.md @@ -1,8 +1,8 @@ --- -title: Mini-XML API Reference +title: Mini-XML 3.0 API Reference author: Michael R Sweet copyright: Copyright © 2003-2019, All Rights Reserved. -docversion: 3.0 +version: 3.0 ... # Introduction @@ -49,18 +49,15 @@ integrated Mini-XML into Gutenprint and removed libxml2. Thanks to lots of feedback and support from various developers, Mini-XML has evolved since then to provide a more complete XML implementation and now stands -at a whopping 4,115 lines of code, compared to 140,410 lines of code for libxml2 -version 2.9.1. +at a whopping 4,186 lines of code, compared to 196,141 lines of code for libxml2 +version 2.9.9. ## Resources -The Mini-XML home page can be found at: - - https://www.msweet.orgm/mxml - -From here you can download the current version of Mini-XML, the issue tracker, -and other resources. +The Mini-XML home page can be found at . From +there you can download the current version of Mini-XML, access the issue +tracker, and find other resources. ## Legal Stuff diff --git a/doc/mxml.epub b/doc/mxml.epub index 863e9d9..59032b6 100644 Binary files a/doc/mxml.epub and b/doc/mxml.epub differ diff --git a/doc/mxml.html b/doc/mxml.html index e8f407c..11bf792 100644 --- a/doc/mxml.html +++ b/doc/mxml.html @@ -1,12 +1,12 @@ - Mini-XML API Reference + Mini-XML 3.0 API Reference - +