Update documentation.

pull/262/head
Michael R Sweet 5 years ago
parent e4ca6951f0
commit b972235840
No known key found for this signature in database
GPG Key ID: 999559A027815955
  1. 27
      README.md
  2. 17
      doc/body.md
  3. BIN
      doc/mxml.epub
  4. 13
      doc/mxml.html

@ -21,6 +21,10 @@ Mini-XML provides the following functionality:
Mini-XML doesn't do validation or other types of processing on the data Mini-XML doesn't do validation or other types of processing on the data
based upon schema files or other sources of definition information. 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 ## Building Mini-XML
@ -62,19 +66,19 @@ against it.
## Documentation ## Documentation
The documentation is available in the `doc` subdirectory in the files The documentation is available in the `doc` subdirectory in the files
`mxml.html` (HTML) and `mxml.pdf` (PDF). You can also look at the `mxml.html` (HTML) and `mxml.epub` (EPUB). You can also look at the
`testmxml.c` and `mxmldoc.c` source files for examples of using Mini-XML. `testmxml.c` source file for examples of using Mini-XML.
Mini-XML provides a single header file which you include: Mini-XML provides a single header file which you include:
#include <mxml.h> #include <mxml.h>
Nodes are defined by the `mxml_node_t` structure; the `type` member defines the Nodes (elements, comments, processing directives, integers, opaque strings, real
node type (`element`, `integer`, `opaque`, `real`, or `text`) which determines numbers, and text strings) are represented by `mxml_node_t` objects. New nodes
which value you want to look at in the `value` union. New nodes can be created can be created using the `mxmlNewElement()`, `mxmlNewInteger()`,
using the `mxmlNewElement()`, `mxmlNewInteger()`, `mxmlNewOpaque()`, `mxmlNewOpaque()`, `mxmlNewReal()`, and `mxmlNewText()` functions. Only
`mxmlNewReal()`, and `mxmlNewText()` functions. Only elements can have child elements can have child nodes, and the top node must be the "?xml" processing
nodes, and the top node must be an element, usually "?xml". directive.
You load an XML file using the `mxmlLoadFile()` function: 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"); mxml_node_t *value = mxmlFindPath(tree, "path/to/*/foo/bar");
The `mxmlGetInteger()`, `mxmlGetOpaque()`, `mxmlGetReal()`, and 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; mxml_node_t *node;
@ -177,9 +181,8 @@ or the entire tree:
## Getting Help And Reporting Problems ## Getting Help And Reporting Problems
The Mini-XML project page provides access to the Github issue tracking page: 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.
https://www.msweet.org/mxml
## Legal Stuff ## Legal Stuff

@ -1,8 +1,8 @@
--- ---
title: Mini-XML API Reference title: Mini-XML 3.0 API Reference
author: Michael R Sweet author: Michael R Sweet
copyright: Copyright © 2003-2019, All Rights Reserved. copyright: Copyright © 2003-2019, All Rights Reserved.
docversion: 3.0 version: 3.0
... ...
# Introduction # 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 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 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 at a whopping 4,186 lines of code, compared to 196,141 lines of code for libxml2
version 2.9.1. version 2.9.9.
## Resources ## Resources
The Mini-XML home page can be found at: The Mini-XML home page can be found at <https://www.msweet.org/mxml>. From
there you can download the current version of Mini-XML, access the issue
https://www.msweet.orgm/mxml tracker, and find other resources.
From here you can download the current version of Mini-XML, the issue tracker,
and other resources.
## Legal Stuff ## Legal Stuff

Binary file not shown.

@ -1,12 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Mini-XML API Reference</title> <title>Mini-XML 3.0 API Reference</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="creator" content="codedoc v3.2"> <meta name="creator" content="codedoc v3.2">
<meta name="author" content="Michael R Sweet"> <meta name="author" content="Michael R Sweet">
<meta name="copyright" content="Copyright &#xa9; 2003-2019, All Rights Reserved."> <meta name="copyright" content="Copyright &#xa9; 2003-2019, All Rights Reserved.">
<meta name="version" content="0.0"> <meta name="version" content="3.0">
<style type="text/css"><!-- <style type="text/css"><!--
body, p, h1, h2, h3, h4, h5, h6 { body, p, h1, h2, h3, h4, h5, h6 {
font-family: sans-serif; font-family: sans-serif;
@ -160,7 +160,7 @@ h2.title, h3.title {
<body> <body>
<div class="header"> <div class="header">
<p><img src="doc/mxml-cover.png" width="100%"></p> <p><img src="doc/mxml-cover.png" width="100%"></p>
<h1 class="title">Mini-XML API Reference</h1> <h1 class="title">Mini-XML 3.0 API Reference</h1>
<p>Michael R Sweet</p> <p>Michael R Sweet</p>
<p>Copyright &#xa9; 2003-2019, All Rights Reserved.</p> <p>Copyright &#xa9; 2003-2019, All Rights Reserved.</p>
</div> </div>
@ -314,12 +314,9 @@ h2.title, h3.title {
<p>Given the limited scope of what you use in XML, it should be trivial to code a mini-XML API in a few hundred lines of code.</p> <p>Given the limited scope of what you use in XML, it should be trivial to code a mini-XML API in a few hundred lines of code.</p>
</blockquote> </blockquote>
<p>I took my own challenge and coded furiously for two days to produced the initial public release of Mini-XML, total lines of code: 696. Robert promptly integrated Mini-XML into Gutenprint and removed libxml2.</p> <p>I took my own challenge and coded furiously for two days to produced the initial public release of Mini-XML, total lines of code: 696. Robert promptly integrated Mini-XML into Gutenprint and removed libxml2.</p>
<p>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.</p> <p>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,186 lines of code, compared to 196,141 lines of code for libxml2 version 2.9.9.</p>
<h3 class="title" id="resources">Resources</h3> <h3 class="title" id="resources">Resources</h3>
<p>The Mini-XML home page can be found at:</p> <p>The Mini-XML home page can be found at <a href="https://www.msweet.org/mxml">https://www.msweet.org/mxml</a>. From there you can download the current version of Mini-XML, access the issue tracker, and find other resources.</p>
<pre><code>https://www.msweet.orgm/mxml
</code></pre>
<p>From here you can download the current version of Mini-XML, the issue tracker, and other resources.</p>
<h3 class="title" id="legal-stuff">Legal Stuff</h3> <h3 class="title" id="legal-stuff">Legal Stuff</h3>
<p>The Mini-XML library is copyright &#xa9; 2003-2019 by Michael R Sweet and is provided under the Apache License Version 2.0 with an exception to allow linking against GPL2/LGPL2-only software. See the files &quot;LICENSE&quot; and &quot;NOTICE&quot; for more information.</p> <p>The Mini-XML library is copyright &#xa9; 2003-2019 by Michael R Sweet and is provided under the Apache License Version 2.0 with an exception to allow linking against GPL2/LGPL2-only software. See the files &quot;LICENSE&quot; and &quot;NOTICE&quot; for more information.</p>
<h2 class="title" id="using-mini-xml">Using Mini-XML</h2> <h2 class="title" id="using-mini-xml">Using Mini-XML</h2>

Loading…
Cancel
Save