Update documentation.

pull/193/head
Michael R Sweet 15 years ago
parent 96a610c1e5
commit d13e530148
  1. 4
      CHANGES
  2. 4
      doc/intro.html
  3. 1
      doc/license.html
  4. 153
      doc/mxml.html
  5. 14
      doc/mxmldoc.html
  6. 35
      doc/relnotes.html
  7. 8
      doc/title.html

@ -1,10 +1,10 @@
CHANGES - 2009-05-04 CHANGES - 2009-05-16
-------------------- --------------------
CHANGES IN Mini-XML 2.6 CHANGES IN Mini-XML 2.6
- Documentation fixes (STR #91, STR #92) - Documentation fixes (STR #91, STR #92)
- The mxmldoc program did handle typedef comments properly (STR #72) - The mxmldoc program did not handle typedef comments properly (STR #72)
- Added support for "long long" printf formats. - Added support for "long long" printf formats.
- The XML parser now rejects UTF-8 XML files that start with a BOM - The XML parser now rejects UTF-8 XML files that start with a BOM
(STR #89) (STR #89)

@ -50,9 +50,6 @@ following projects/software applications:</p>
<li><a href='http://www.cups.org/'>Common UNIX Printing <li><a href='http://www.cups.org/'>Common UNIX Printing
System</a></li> System</a></li>
<li><a href='http://www.cups.org/ddk/'>CUPS Driver
Development Kit</a></li>
<li><a <li><a
href='http://zynaddsubfx.sourceforge.net'>ZynAddSubFX</a></li> href='http://zynaddsubfx.sourceforge.net'>ZynAddSubFX</a></li>
@ -63,6 +60,7 @@ project added or removed from this list, or if you have any
comments/quotes you would like me to publish about your comments/quotes you would like me to publish about your
experiences with Mini-XML.</p> experiences with Mini-XML.</p>
<!-- NEED 1in -->
<h2>Organization of This Document</h2> <h2>Organization of This Document</h2>
<p>This manual is organized into the following chapters and <p>This manual is organized into the following chapters and

@ -32,6 +32,7 @@ the following exceptions:</p>
</ol> </ol>
<!-- NEW PAGE -->
<p align=center><b>GNU LIBRARY GENERAL PUBLIC LICENSE</b></p> <p align=center><b>GNU LIBRARY GENERAL PUBLIC LICENSE</b></p>
<p align='center'>Version 2, June 1991 <p align='center'>Version 2, June 1991
<br />Copyright (C) 1991 Free Software Foundation, Inc. <br />Copyright (C) 1991 Free Software Foundation, Inc.

@ -1,9 +1,9 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML> <HTML>
<HEAD> <HEAD>
<TITLE>Mini-XML Programmers Manual, Version 2.5</TITLE> <TITLE>Mini-XML Programmers Manual, Version 2.6</TITLE>
<META NAME="author" CONTENT="Michael R. Sweet"> <META NAME="author" CONTENT="Michael R. Sweet">
<META NAME="copyright" CONTENT="Copyright 2003-2008"> <META NAME="copyright" CONTENT="Copyright 2003-2009">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
<STYLE TYPE="text/css"><!-- <STYLE TYPE="text/css"><!--
BODY { font-family: sans-serif } BODY { font-family: sans-serif }
@ -66,7 +66,12 @@ A { text-decoration: none }
</UL> </UL>
<B><A HREF="#MXMLDOC">Using the mxmldoc Utility</A></B> <B><A HREF="#MXMLDOC">Using the mxmldoc Utility</A></B>
<UL> <UL>
<LI><A HREF="#5_1">The Basics</A></LI> <LI><A HREF="#5_1">The Basics</A>
<UL>
<LI><A HREF="#5_1_1">Creating Man Pages</A></LI>
<LI><A HREF="#5_1_2">Creating Xcode Documentation Sets</A></LI>
</UL>
</LI>
<LI><A HREF="#5_2">Commenting Your Code</A></LI> <LI><A HREF="#5_2">Commenting Your Code</A></LI>
<LI><A HREF="#5_3">Titles, Sections, and Introductions</A></LI> <LI><A HREF="#5_3">Titles, Sections, and Introductions</A></LI>
</UL> </UL>
@ -140,6 +145,7 @@ A { text-decoration: none }
<LI><A HREF="#mxml_custom_save_cb_t">mxml_custom_save_cb_t</A></LI> <LI><A HREF="#mxml_custom_save_cb_t">mxml_custom_save_cb_t</A></LI>
<LI><A HREF="#8_3_5">mxml_custom_t</A></LI> <LI><A HREF="#8_3_5">mxml_custom_t</A></LI>
<LI><A HREF="#mxml_element_t">mxml_element_t</A></LI> <LI><A HREF="#mxml_element_t">mxml_element_t</A></LI>
<LI><A HREF="#mxml_entity_cb_t">mxml_entity_cb_t</A></LI>
<LI><A HREF="#mxml_error_cb_t">mxml_error_cb_t</A></LI> <LI><A HREF="#mxml_error_cb_t">mxml_error_cb_t</A></LI>
<LI><A HREF="#mxml_index_t">mxml_index_t</A></LI> <LI><A HREF="#mxml_index_t">mxml_index_t</A></LI>
<LI><A HREF="#mxml_load_cb_t">mxml_load_cb_t</A></LI> <LI><A HREF="#mxml_load_cb_t">mxml_load_cb_t</A></LI>
@ -148,6 +154,7 @@ A { text-decoration: none }
<LI><A HREF="#mxml_sax_cb_t">mxml_sax_cb_t</A></LI> <LI><A HREF="#mxml_sax_cb_t">mxml_sax_cb_t</A></LI>
<LI><A HREF="#mxml_sax_event_t">mxml_sax_event_t</A></LI> <LI><A HREF="#mxml_sax_event_t">mxml_sax_event_t</A></LI>
<LI><A HREF="#mxml_text_t">mxml_text_t</A></LI> <LI><A HREF="#mxml_text_t">mxml_text_t</A></LI>
<LI><A HREF="#mxml_type_t">mxml_type_t</A></LI>
<LI><A HREF="#mxml_value_t">mxml_value_t</A></LI> <LI><A HREF="#mxml_value_t">mxml_value_t</A></LI>
</UL> </UL>
</LI> </LI>
@ -178,7 +185,7 @@ A { text-decoration: none }
<HR NOSHADE> <HR NOSHADE>
<H1 align="right"><A name="INTRO"><IMG align="right" alt="0" height="100" <H1 align="right"><A name="INTRO"><IMG align="right" alt="0" height="100"
hspace="10" src="0.gif" width="100"></A>Introduction</H1> hspace="10" src="0.gif" width="100"></A>Introduction</H1>
<P>This programmers manual describes Mini-XML version 2.5, a small XML <P>This programmers manual describes Mini-XML version 2.6, a small XML
parsing library that you can use to read and write XML data files in parsing library that you can use to read and write XML data files in
your C and C++ applications.</P> your C and C++ applications.</P>
<P>Mini-XML was initially developed for the <A href="http://gutenprint.sf.net/"> <P>Mini-XML was initially developed for the <A href="http://gutenprint.sf.net/">
@ -204,12 +211,13 @@ libxml2</TT> library with something substantially smaller and
projects/software applications:</P> projects/software applications:</P>
<UL> <UL>
<LI><A href="http://www.cups.org/">Common UNIX Printing System</A></LI> <LI><A href="http://www.cups.org/">Common UNIX Printing System</A></LI>
<LI><A href="http://www.cups.org/ddk/">CUPS Driver Development Kit</A></LI>
<LI><A href="http://zynaddsubfx.sourceforge.net">ZynAddSubFX</A></LI> <LI><A href="http://zynaddsubfx.sourceforge.net">ZynAddSubFX</A></LI>
</UL> </UL>
<P>Please email me (mxml @ easysw . com) if you would like your project <P>Please email me (mxml @ easysw . com) if you would like your project
added or removed from this list, or if you have any comments/quotes you added or removed from this list, or if you have any comments/quotes you
would like me to publish about your experiences with Mini-XML.</P> would like me to publish about your experiences with Mini-XML.</P>
<!-- NEED 1in -->
<H2><A NAME="1_1">Organization of This Document</A></H2> <H2><A NAME="1_1">Organization of This Document</A></H2>
<P>This manual is organized into the following chapters and appendices:</P> <P>This manual is organized into the following chapters and appendices:</P>
<UL> <UL>
@ -238,14 +246,14 @@ libxml2</TT> library with something substantially smaller and
<P>Various font and syntax conventions are used in this guide. Examples <P>Various font and syntax conventions are used in this guide. Examples
and their meanings and uses are explained below:</P> and their meanings and uses are explained below:</P>
<DL> <DL>
<DT><CODE>lpstat</CODE> <DT><CODE>mxmldoc</CODE>
<BR> <CODE>lpstat(1)</CODE></DT> <BR> <CODE>mxmldoc(1)</CODE></DT>
<DD>The names of commands; the first mention of a command or function in <DD>The names of commands; the first mention of a command or function in
a chapter is followed by a manual page section number. a chapter is followed by a manual page section number.
<BR> <BR>
<BR></DD> <BR></DD>
<DT><VAR>/var</VAR> <DT><VAR>/var</VAR>
<BR><VAR> /usr/share/cups/data/testprint.ps</VAR></DT> <BR><VAR> /etc/hosts</VAR></DT>
<DD>File and directory names. <DD>File and directory names.
<BR> <BR>
<BR></DD> <BR></DD>
@ -312,15 +320,9 @@ libxml2</TT> library with something substantially smaller and
<!-- NEED 6 --> <!-- NEED 6 -->
<H2><A NAME="1_5">Legal Stuff</A></H2> <H2><A NAME="1_5">Legal Stuff</A></H2>
<P>The Mini-XML library is copyright 2003-2008 by Michael Sweet.</P> <P>The Mini-XML library is copyright 2003-2009 by Michael Sweet. License
<P>This library is free software; you can redistribute it and/or modify terms are described in <A href="#LICENSE">Appendix A - Mini-XML License</A>
it under the terms of the <A href="#LICENSE">GNU Library General Public .</P>
License</A> as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.</P>
<P>This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.</P>
<HR NOSHADE> <HR NOSHADE>
<H1 align="right"><A name="INSTALL"><IMG align="right" alt="1" height="100" <H1 align="right"><A name="INSTALL"><IMG align="right" alt="1" height="100"
hspace="10" src="1.gif" width="100"></A>Building, Installing, and hspace="10" src="1.gif" width="100"></A>Building, Installing, and
@ -1246,10 +1248,10 @@ mxmlSAXLoadString</TT></A> functions provide the SAX loading APIs. Each
<LI><TT>MXML_SAX_DATA</TT> - Data (custom, integer, opaque, real, or <LI><TT>MXML_SAX_DATA</TT> - Data (custom, integer, opaque, real, or
text) was just read</LI> text) was just read</LI>
<LI><TT>MXML_SAX_DIRECTIVE</TT> - A processing directive was just read</LI> <LI><TT>MXML_SAX_DIRECTIVE</TT> - A processing directive was just read</LI>
<LI><TT>MXML_SAX_ELEMENT_CLOSE</TT> - An open element was just read (<TT> <LI><TT>MXML_SAX_ELEMENT_CLOSE</TT> - A close element was just read (<TT>
&lt;element&gt;</TT>)</LI>
<LI><TT>MXML_SAX_ELEMENT_OPEN</TT> - A close element was just read (<TT>
&lt;/element&gt;</TT>)</LI> &lt;/element&gt;</TT>)</LI>
<LI><TT>MXML_SAX_ELEMENT_OPEN</TT> - An open element was just read (<TT>
&lt;element&gt;</TT>)</LI>
</UL> </UL>
<P>Elements are<EM> released</EM> after the close element is processed. <P>Elements are<EM> released</EM> after the close element is processed.
All other nodes are released after they are processed. The SAX callback All other nodes are released after they are processed. The SAX callback
@ -1381,6 +1383,7 @@ hspace="10" src="4.gif" width="100"></A>Using the mxmldoc Utility</H1>
<PRE> <PRE>
<KBD>mxmldoc filename.xml &gt;filename.html ENTER</KBD> <KBD>mxmldoc filename.xml &gt;filename.html ENTER</KBD>
</PRE> </PRE>
<H3><A NAME="5_1_1">Creating Man Pages</A></H3>
<P>The <TT>--man filename</TT> option tells <TT>mxmldoc</TT> to create a <P>The <TT>--man filename</TT> option tells <TT>mxmldoc</TT> to create a
man page instead of HTML documentation, for example:</P> man page instead of HTML documentation, for example:</P>
<PRE> <PRE>
@ -1389,10 +1392,16 @@ hspace="10" src="4.gif" width="100"></A>Using the mxmldoc Utility</H1>
<KBD>mxmldoc --man filename *.h *.c \ <KBD>mxmldoc --man filename *.h *.c \
&gt;filename.man ENTER</KBD> &gt;filename.man ENTER</KBD>
<KBD>mxmldoc --man filename filename.xml *.h *.c \
&gt;filename.man ENTER</KBD>
</PRE> </PRE>
<H3><A NAME="5_1_2">Creating Xcode Documentation Sets</A></H3>
<P>The <TT>--docset directory.docset</TT> option tells <TT>mxmldoc</TT>
to create an Xcode documentation set containing the HTML documentation,
for example:</P>
<PRE>
<KBD>mxmldoc --docset foo.docset *.h *.c foo.xml ENTER</KBD>
</PRE>
<P>Xcode documentation sets can only be built on Mac OS X with Xcode 3.0
or higher installed.</P>
<H2><A NAME="5_2">Commenting Your Code</A></H2> <H2><A NAME="5_2">Commenting Your Code</A></H2>
<P>As noted previously, <TT>mxmldoc</TT> looks for in-line comments to <P>As noted previously, <TT>mxmldoc</TT> looks for in-line comments to
describe the functions, types, and constants in your code. <TT>Mxmldoc</TT> describe the functions, types, and constants in your code. <TT>Mxmldoc</TT>
@ -1509,6 +1518,8 @@ hspace="10" src="A.gif" width="100"></A>Mini-XML License</H1>
identify the Mini-XML license in your program or documentation as identify the Mini-XML license in your program or documentation as
required by section 6 of the LGPL.</LI> required by section 6 of the LGPL.</LI>
</OL> </OL>
<!-- NEW PAGE -->
<P align="center"><B>GNU LIBRARY GENERAL PUBLIC LICENSE</B></P> <P align="center"><B>GNU LIBRARY GENERAL PUBLIC LICENSE</B></P>
<P align="center">Version 2, June 1991 <P align="center">Version 2, June 1991
<BR> Copyright (C) 1991 Free Software Foundation, Inc. <BR> Copyright (C) 1991 Free Software Foundation, Inc.
@ -1925,7 +1936,27 @@ hspace="10" src="A.gif" width="100"></A>Mini-XML License</H1>
<HR NOSHADE> <HR NOSHADE>
<H1 align="right"><A name="RELNOTES"><IMG align="right" alt="B" height="100" <H1 align="right"><A name="RELNOTES"><IMG align="right" alt="B" height="100"
hspace="10" src="B.gif" width="100"></A>Release Notes</H1> hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<H2><A NAME="7_1">Changes in Mini-XML 2.5</A></H2> <H2><A NAME="7_1">Changes in Mini-XML 2.6</A></H2>
<UL>
<LI>Documentation fixes (STR #91, STR #92)</LI>
<LI>The mxmldoc program did not handle typedef comments properly (STR
#72)</LI>
<LI>Added support for &quot;long long&quot; printf formats.</LI>
<LI>The XML parser now rejects UTF-8 XML files that start with a BOM
(STR #89)</LI>
<LI>The mxmldoc program now supports generating Xcode documentation
sets.</LI>
<LI>mxmlSave*() did not output UTF-8 correctly on some platforms.</LI>
<LI>mxmlNewXML() now adds encoding=&quot;utf-8&quot; in the ?xml directive to
avoid problems with non-conformant XML parsers that assume something
other than UTF-8 as the default encoding.</LI>
<LI>Wrapping was not disabled when mxmlSetWrapMargin(0) was called, and
&quot;&lt;?xml ... ?&gt;&quot; was always followed by a newline (STR #76)</LI>
<LI>The mxml.pc.in file was broken (STR #79)</LI>
<LI>The mxmldoc program now handles &quot;typedef enum name {} name&quot;
correctly (STR #72)</LI>
</UL>
<H2><A NAME="7_2">Changes in Mini-XML 2.5</A></H2>
<UL> <UL>
<LI>The mxmldoc program now makes greater use of CSS and supports a <LI>The mxmldoc program now makes greater use of CSS and supports a
--css option to embed an alternate stylesheet.</LI> --css option to embed an alternate stylesheet.</LI>
@ -1942,7 +1973,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
top level of a document (STR #67)</LI> top level of a document (STR #67)</LI>
<LI>Spaces around the &quot;=&quot; in attributes were not supported (STR #67)</LI> <LI>Spaces around the &quot;=&quot; in attributes were not supported (STR #67)</LI>
</UL> </UL>
<H2><A NAME="7_2">Changes in Mini-XML 2.4</A></H2> <H2><A NAME="7_3">Changes in Mini-XML 2.4</A></H2>
<UL> <UL>
<LI>Fixed shared library build problems on HP-UX and Mac OS X.</LI> <LI>Fixed shared library build problems on HP-UX and Mac OS X.</LI>
<LI>The mxmldoc program did not output argument descriptions for <LI>The mxmldoc program did not output argument descriptions for
@ -1962,7 +1993,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>mxmlWalkNext() and mxmlWalkPrev() did not work correctly when called <LI>mxmlWalkNext() and mxmlWalkPrev() did not work correctly when called
with a node with no children as the top node (STR #53)</LI> with a node with no children as the top node (STR #53)</LI>
</UL> </UL>
<H2><A NAME="7_3">Changes in Mini-XML 2.3</A></H2> <H2><A NAME="7_4">Changes in Mini-XML 2.3</A></H2>
<UL> <UL>
<LI>Added two exceptions to the LGPL to support static linking of <LI>Added two exceptions to the LGPL to support static linking of
applications against Mini-XML</LI> applications against Mini-XML</LI>
@ -2000,12 +2031,12 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>mxmlLoad*() did not treat custom data as opaque, so whitespace <LI>mxmlLoad*() did not treat custom data as opaque, so whitespace
characters would be lost</LI> characters would be lost</LI>
</UL> </UL>
<H2><A NAME="7_4">Changes in Mini-XML 2.2.2</A></H2> <H2><A NAME="7_5">Changes in Mini-XML 2.2.2</A></H2>
<UL> <UL>
<LI>mxmlLoad*() did not treat custom data as opaque, so whitespace <LI>mxmlLoad*() did not treat custom data as opaque, so whitespace
characters would be lost.</LI> characters would be lost.</LI>
</UL> </UL>
<H2><A NAME="7_5">Changes in Mini-XML 2.2.1</A></H2> <H2><A NAME="7_6">Changes in Mini-XML 2.2.1</A></H2>
<UL> <UL>
<LI>mxmlLoadFd(), mxmlLoadFile(), and mxmlLoadString() now correctly <LI>mxmlLoadFd(), mxmlLoadFile(), and mxmlLoadString() now correctly
return NULL on error (STR #21)</LI> return NULL on error (STR #21)</LI>
@ -2016,7 +2047,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
proper permissions on UNIX/Linux/OSX.</LI> proper permissions on UNIX/Linux/OSX.</LI>
<LI>Fixed a MingW/Cygwin compilation problem (STR #18)</LI> <LI>Fixed a MingW/Cygwin compilation problem (STR #18)</LI>
</UL> </UL>
<H2><A NAME="7_6">Changes in Mini-XML 2.2</A></H2> <H2><A NAME="7_7">Changes in Mini-XML 2.2</A></H2>
<UL> <UL>
<LI>Added shared library support (STR #17)</LI> <LI>Added shared library support (STR #17)</LI>
<LI>mxmlLoad*() now returns an error when an XML stream contains illegal <LI>mxmlLoad*() now returns an error when an XML stream contains illegal
@ -2030,7 +2061,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>Added checking for invalid comment termination (&quot;---&gt;&quot; is not <LI>Added checking for invalid comment termination (&quot;---&gt;&quot; is not
allowed)</LI> allowed)</LI>
</UL> </UL>
<H2><A NAME="7_7">Changes in Mini-XML 2.1</A></H2> <H2><A NAME="7_8">Changes in Mini-XML 2.1</A></H2>
<UL> <UL>
<LI>Added support for custom data nodes (STR #6)</LI> <LI>Added support for custom data nodes (STR #6)</LI>
<LI>Now treat UTF-8 sequences which are longer than necessary as an <LI>Now treat UTF-8 sequences which are longer than necessary as an
@ -2041,7 +2072,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>Added mxmlLoadFd() and mxmlSaveFd() functions.</LI> <LI>Added mxmlLoadFd() and mxmlSaveFd() functions.</LI>
<LI>Fixed multi-word UTF-16 handling.</LI> <LI>Fixed multi-word UTF-16 handling.</LI>
</UL> </UL>
<H2><A NAME="7_8">Changes in Mini-XML 2.0</A></H2> <H2><A NAME="7_9">Changes in Mini-XML 2.0</A></H2>
<UL> <UL>
<LI>New programmers manual.</LI> <LI>New programmers manual.</LI>
<LI>Added Visual C++ project files for Microsoft Windows users.</LI> <LI>Added Visual C++ project files for Microsoft Windows users.</LI>
@ -2074,7 +2105,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
destination path and install path. This caused problems when building destination path and install path. This caused problems when building
and installing with MingW.</LI> and installing with MingW.</LI>
</UL> </UL>
<H2><A NAME="7_9">Changes in Mini-XML 1.3</A></H2> <H2><A NAME="7_10">Changes in Mini-XML 1.3</A></H2>
<UL> <UL>
<LI>Fixes for mxmldoc.</LI> <LI>Fixes for mxmldoc.</LI>
<LI>Added support for reading standard HTML entity names.</LI> <LI>Added support for reading standard HTML entity names.</LI>
@ -2090,7 +2121,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>The load and save functions now properly handle quoted element and <LI>The load and save functions now properly handle quoted element and
attribute name strings properly, e.g. for !DOCTYPE declarations.</LI> attribute name strings properly, e.g. for !DOCTYPE declarations.</LI>
</UL> </UL>
<H2><A NAME="7_10">Changes in Mini-XML 1.2</A></H2> <H2><A NAME="7_11">Changes in Mini-XML 1.2</A></H2>
<UL> <UL>
<LI>Added new &quot;set&quot; methods to set the value of a node.</LI> <LI>Added new &quot;set&quot; methods to set the value of a node.</LI>
<LI>Added new formatted text methods mxmlNewTextf() and mxmlSetTextf() <LI>Added new formatted text methods mxmlNewTextf() and mxmlSetTextf()
@ -2103,13 +2134,13 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>Added --with/without-snprintf configure option to control the <LI>Added --with/without-snprintf configure option to control the
snprintf() and vsnprintf() function checks.</LI> snprintf() and vsnprintf() function checks.</LI>
</UL> </UL>
<H2><A NAME="7_11">Changes in Mini-XML 1.1.2</A></H2> <H2><A NAME="7_12">Changes in Mini-XML 1.1.2</A></H2>
<UL> <UL>
<LI>The mxml(3) man page wasn't updated for the string functions.</LI> <LI>The mxml(3) man page wasn't updated for the string functions.</LI>
<LI>mxmlSaveString() returned the wrong number of characters.</LI> <LI>mxmlSaveString() returned the wrong number of characters.</LI>
<LI>mxml_add_char() updated the buffer pointer in the wrong place.</LI> <LI>mxml_add_char() updated the buffer pointer in the wrong place.</LI>
</UL> </UL>
<H2><A NAME="7_12">Changes in Mini-XML 1.1.1</A></H2> <H2><A NAME="7_13">Changes in Mini-XML 1.1.1</A></H2>
<UL> <UL>
<LI>The private mxml_add_ch() function did not update the <LI>The private mxml_add_ch() function did not update the
start-of-buffer pointer which could cause a crash when using start-of-buffer pointer which could cause a crash when using
@ -2120,7 +2151,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>Added a mxmlSaveAllocString() convenience function for saving an XML <LI>Added a mxmlSaveAllocString() convenience function for saving an XML
node tree to an allocated string.</LI> node tree to an allocated string.</LI>
</UL> </UL>
<H2><A NAME="7_13">Changes in Mini-XML 1.1</A></H2> <H2><A NAME="7_14">Changes in Mini-XML 1.1</A></H2>
<UL> <UL>
<LI>The mxmlLoadFile() function now uses dynamically allocated string <LI>The mxmlLoadFile() function now uses dynamically allocated string
buffers for element names, attribute names, and attribute values. buffers for element names, attribute names, and attribute values.
@ -2132,7 +2163,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>Add emulation of strdup() if the local platform does not provide the <LI>Add emulation of strdup() if the local platform does not provide the
function.</LI> function.</LI>
</UL> </UL>
<H2><A NAME="7_14">Changes in Mini-XML 1.0</A></H2> <H2><A NAME="7_15">Changes in Mini-XML 1.0</A></H2>
<UL> <UL>
<LI>The mxmldoc program now handles function arguments, structures, <LI>The mxmldoc program now handles function arguments, structures,
unions, enumerations, classes, and typedefs properly.</LI> unions, enumerations, classes, and typedefs properly.</LI>
@ -2140,7 +2171,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
code.</LI> code.</LI>
<LI>Added man pages and packaging files.</LI> <LI>Added man pages and packaging files.</LI>
</UL> </UL>
<H2><A NAME="7_15">Changes in Mini-XML 0.93</A></H2> <H2><A NAME="7_16">Changes in Mini-XML 0.93</A></H2>
<UL> <UL>
<LI>New mxmldoc example program that is also used to create and update <LI>New mxmldoc example program that is also used to create and update
code documentation using XML and produce HTML reference pages.</LI> code documentation using XML and produce HTML reference pages.</LI>
@ -2165,15 +2196,15 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
<LI>mxmlSaveFile() now supports a whitespace callback to provide more <LI>mxmlSaveFile() now supports a whitespace callback to provide more
human-readable XML output under program control.</LI> human-readable XML output under program control.</LI>
</UL> </UL>
<H2><A NAME="7_16">Changes in Mini-XML 0.92</A></H2> <H2><A NAME="7_17">Changes in Mini-XML 0.92</A></H2>
<UL> <UL>
<LI>mxmlSaveFile() didn't return a value on success.</LI> <LI>mxmlSaveFile() didn't return a value on success.</LI>
</UL> </UL>
<H2><A NAME="7_17">Changes in Mini-XML 0.91</A></H2> <H2><A NAME="7_18">Changes in Mini-XML 0.91</A></H2>
<UL> <UL>
<LI>mxmlWalkNext() would go into an infinite loop.</LI> <LI>mxmlWalkNext() would go into an infinite loop.</LI>
</UL> </UL>
<H2><A NAME="7_18">Changes in Mini-XML 0.9</A></H2> <H2><A NAME="7_19">Changes in Mini-XML 0.9</A></H2>
<UL> <UL>
<LI>Initial public release.</LI> <LI>Initial public release.</LI>
</UL> </UL>
@ -2299,6 +2330,8 @@ mxml_custom_save_cb_t</A></LI>
</LI> </LI>
<LI><A href="#mxml_element_t" title="An XML element value."> <LI><A href="#mxml_element_t" title="An XML element value.">
mxml_element_t</A></LI> mxml_element_t</A></LI>
<LI><A href="#mxml_entity_cb_t" title="Entity callback function">
mxml_entity_cb_t</A></LI>
<LI><A href="#mxml_error_cb_t" title="Error callback function"> <LI><A href="#mxml_error_cb_t" title="Error callback function">
mxml_error_cb_t</A></LI> mxml_error_cb_t</A></LI>
<LI><A href="#mxml_index_t" title="An XML node index.">mxml_index_t</A></LI> <LI><A href="#mxml_index_t" title="An XML node index.">mxml_index_t</A></LI>
@ -2312,6 +2345,7 @@ mxml_save_cb_t</A></LI>
<LI><A href="#mxml_sax_event_t" title="SAX event type.">mxml_sax_event_t</A> <LI><A href="#mxml_sax_event_t" title="SAX event type.">mxml_sax_event_t</A>
</LI> </LI>
<LI><A href="#mxml_text_t" title="An XML text value.">mxml_text_t</A></LI> <LI><A href="#mxml_text_t" title="An XML text value.">mxml_text_t</A></LI>
<LI><A href="#mxml_type_t" title="The XML node type.">mxml_type_t</A></LI>
<LI><A href="#mxml_value_t" title="An XML node value.">mxml_value_t</A></LI> <LI><A href="#mxml_value_t" title="An XML node value.">mxml_value_t</A></LI>
</UL> </UL>
</LI> </LI>
@ -2340,7 +2374,6 @@ mxml_element_s</A></LI>
<LI><A href="#mxml_type_e" title="The XML node type.">mxml_type_e</A></LI> <LI><A href="#mxml_type_e" title="The XML node type.">mxml_type_e</A></LI>
</UL> </UL>
</LI> </LI>
</UL>
<H2 class="title"><A name="FUNCTIONS">Functions</A></H2> <H2 class="title"><A name="FUNCTIONS">Functions</A></H2>
<H3 class="function"><A name="mxmlAdd">mxmlAdd</A></H3> <H3 class="function"><A name="mxmlAdd">mxmlAdd</A></H3>
<P class="description">Add a node to a tree.</P> <P class="description">Add a node to a tree.</P>
@ -2466,7 +2499,14 @@ mxml_element_s</A></LI>
<H3 class="function"><A name="mxmlEntityAddCallback"> <H3 class="function"><A name="mxmlEntityAddCallback">
mxmlEntityAddCallback</A></H3> mxmlEntityAddCallback</A></H3>
<P class="description">Add a callback to convert entities to Unicode.</P> <P class="description">Add a callback to convert entities to Unicode.</P>
<P class="code"> int mxmlEntityAddCallback (void);</P> <P class="code"> int mxmlEntityAddCallback (
<BR> &nbsp;&nbsp;&nbsp;&nbsp;<A href="#mxml_entity_cb_t">mxml_entity_cb_t</A> cb
<BR> );</P>
<H4 class="parameters">Parameters</H4>
<DL>
<DT>cb</DT>
<DD class="description">Callback function to add</DD>
</DL>
<H4 class="returnvalue">Return Value</H4> <H4 class="returnvalue">Return Value</H4>
<P class="description">0 on success, -1 on failure</P> <P class="description">0 on success, -1 on failure</P>
<H3 class="function"><A name="mxmlEntityGetName">mxmlEntityGetName</A></H3> <H3 class="function"><A name="mxmlEntityGetName">mxmlEntityGetName</A></H3>
@ -2504,7 +2544,14 @@ mxmlEntityAddCallback</A></H3>
<H3 class="function"><A name="mxmlEntityRemoveCallback"> <H3 class="function"><A name="mxmlEntityRemoveCallback">
mxmlEntityRemoveCallback</A></H3> mxmlEntityRemoveCallback</A></H3>
<P class="description">Remove a callback.</P> <P class="description">Remove a callback.</P>
<P class="code"> void mxmlEntityRemoveCallback (void);</P> <P class="code"> void mxmlEntityRemoveCallback (
<BR> &nbsp;&nbsp;&nbsp;&nbsp;<A href="#mxml_entity_cb_t">mxml_entity_cb_t</A> cb
<BR> );</P>
<H4 class="parameters">Parameters</H4>
<DL>
<DT>cb</DT>
<DD class="description">Callback function to remove</DD>
</DL>
<H3 class="function"><A name="mxmlFindElement">mxmlFindElement</A></H3> <H3 class="function"><A name="mxmlFindElement">mxmlFindElement</A></H3>
<P class="description">Find the named element.</P> <P class="description">Find the named element.</P>
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A> *mxmlFindElement <P class="code"> <A href="#mxml_node_t">mxml_node_t</A> *mxmlFindElement
@ -3405,10 +3452,10 @@ mxmlSetCustomHandlers</A></H3>
<H4 class="parameters">Parameters</H4> <H4 class="parameters">Parameters</H4>
<DL> <DL>
<DT>column</DT> <DT>column</DT>
<DD class="description">Column for wrapping</DD> <DD class="description">Column for wrapping, 0 to disable wrapping</DD>
</DL> </DL>
<H4 class="discussion">Discussion</H4> <H4 class="discussion">Discussion</H4>
<P class="discussion">Wrapping is disabled when &quot;column&quot; is &lt;= 0.</P> <P class="discussion">Wrapping is disabled when &quot;column&quot; is 0.</P>
<H3 class="function"><A name="mxmlWalkNext">mxmlWalkNext</A></H3> <H3 class="function"><A name="mxmlWalkNext">mxmlWalkNext</A></H3>
<P class="description">Walk to the next logical node in the tree.</P> <P class="description">Walk to the next logical node in the tree.</P>
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A> *mxmlWalkNext ( <P class="code"> <A href="#mxml_node_t">mxml_node_t</A> *mxmlWalkNext (
@ -3484,6 +3531,9 @@ mxml_node_t</A> *);</P>
<P class="description">An XML element value.</P> <P class="description">An XML element value.</P>
<P class="code"> typedef struct <A href="#mxml_element_s">mxml_element_s</A> <P class="code"> typedef struct <A href="#mxml_element_s">mxml_element_s</A>
mxml_element_t;</P> mxml_element_t;</P>
<H3 class="typedef"><A name="mxml_entity_cb_t">mxml_entity_cb_t</A></H3>
<P class="description">Entity callback function</P>
<P class="code"> typedef int (*mxml_entity_cb_t)(const char *);</P>
<H3 class="typedef"><A name="mxml_error_cb_t">mxml_error_cb_t</A></H3> <H3 class="typedef"><A name="mxml_error_cb_t">mxml_error_cb_t</A></H3>
<P class="description">Error callback function</P> <P class="description">Error callback function</P>
<P class="code"> typedef void (*mxml_error_cb_t)(const char *);</P> <P class="code"> typedef void (*mxml_error_cb_t)(const char *);</P>
@ -3493,8 +3543,8 @@ mxml_node_t</A> *);</P>
mxml_index_t;</P> mxml_index_t;</P>
<H3 class="typedef"><A name="mxml_load_cb_t">mxml_load_cb_t</A></H3> <H3 class="typedef"><A name="mxml_load_cb_t">mxml_load_cb_t</A></H3>
<P class="description">Load callback function</P> <P class="description">Load callback function</P>
<P class="code"> typedef mxml_type_t (*mxml_load_cb_t)(<A href="#mxml_node_t"> <P class="code"> typedef <A href="#mxml_type_t">mxml_type_t</A>
mxml_node_t</A> *);</P> (*mxml_load_cb_t)(<A href="#mxml_node_t">mxml_node_t</A> *);</P>
<H3 class="typedef"><A name="mxml_node_t">mxml_node_t</A></H3> <H3 class="typedef"><A name="mxml_node_t">mxml_node_t</A></H3>
<P class="description">An XML node.</P> <P class="description">An XML node.</P>
<P class="code"> typedef struct <A href="#mxml_node_s">mxml_node_s</A> <P class="code"> typedef struct <A href="#mxml_node_s">mxml_node_s</A>
@ -3515,6 +3565,10 @@ mxml_sax_event_e</A> mxml_sax_event_t;</P>
<P class="description">An XML text value.</P> <P class="description">An XML text value.</P>
<P class="code"> typedef struct <A href="#mxml_text_s">mxml_text_s</A> <P class="code"> typedef struct <A href="#mxml_text_s">mxml_text_s</A>
mxml_text_t;</P> mxml_text_t;</P>
<H3 class="typedef"><A name="mxml_type_t">mxml_type_t</A></H3>
<P class="description">The XML node type.</P>
<P class="code"> typedef enum <A href="#mxml_type_e">mxml_type_e</A>
mxml_type_t;</P>
<H3 class="typedef"><A name="mxml_value_t">mxml_value_t</A></H3> <H3 class="typedef"><A name="mxml_value_t">mxml_value_t</A></H3>
<P class="description">An XML node value.</P> <P class="description">An XML node value.</P>
<P class="code"> typedef union <A href="#mxml_value_u">mxml_value_u</A> <P class="code"> typedef union <A href="#mxml_value_u">mxml_value_u</A>
@ -3596,7 +3650,7 @@ mxml_sax_event_e</A> mxml_sax_event_t;</P>
<BR> &nbsp;&nbsp;&nbsp;&nbsp;struct <A href="#mxml_node_s">mxml_node_s</A> *parent; <BR> &nbsp;&nbsp;&nbsp;&nbsp;struct <A href="#mxml_node_s">mxml_node_s</A> *parent;
<BR> &nbsp;&nbsp;&nbsp;&nbsp;struct <A href="#mxml_node_s">mxml_node_s</A> *prev; <BR> &nbsp;&nbsp;&nbsp;&nbsp;struct <A href="#mxml_node_s">mxml_node_s</A> *prev;
<BR> &nbsp;&nbsp;&nbsp;&nbsp;int ref_count; <BR> &nbsp;&nbsp;&nbsp;&nbsp;int ref_count;
<BR> &nbsp;&nbsp;&nbsp;&nbsp;mxml_type_t type; <BR> &nbsp;&nbsp;&nbsp;&nbsp;<A href="#mxml_type_t">mxml_type_t</A> type;
<BR> &nbsp;&nbsp;&nbsp;&nbsp;void *user_data; <BR> &nbsp;&nbsp;&nbsp;&nbsp;void *user_data;
<BR> &nbsp;&nbsp;&nbsp;&nbsp;<A href="#mxml_value_t">mxml_value_t</A> value; <BR> &nbsp;&nbsp;&nbsp;&nbsp;<A href="#mxml_value_t">mxml_value_t</A> value;
<BR> };</P> <BR> };</P>
@ -3703,6 +3757,7 @@ mxml_sax_event_e</A> mxml_sax_event_t;</P>
<DT>MXML_TEXT</DT> <DT>MXML_TEXT</DT>
<DD class="description">Text fragment</DD> <DD class="description">Text fragment</DD>
</DL> </DL>
</UL>
</DIV><HR NOSHADE> </DIV><HR NOSHADE>
<H1 align="right"><A name="SCHEMA"><IMG align="right" alt="D" height="100" <H1 align="right"><A name="SCHEMA"><IMG align="right" alt="D" height="100"
hspace="10" src="D.gif" width="100"></A>XML Schema</H1> hspace="10" src="D.gif" width="100"></A>XML Schema</H1>

@ -53,6 +53,8 @@ to generate the HTML documentation:</p>
<kbd>mxmldoc filename.xml &gt;filename.html ENTER</kbd> <kbd>mxmldoc filename.xml &gt;filename.html ENTER</kbd>
</pre> </pre>
<h3>Creating Man Pages</h3>
<p>The <tt>--man filename</tt> option tells <tt>mxmldoc</tt> to <p>The <tt>--man filename</tt> option tells <tt>mxmldoc</tt> to
create a man page instead of HTML documentation, for example:</p> create a man page instead of HTML documentation, for example:</p>
@ -62,27 +64,21 @@ create a man page instead of HTML documentation, for example:</p>
<kbd>mxmldoc --man filename *.h *.c \ <kbd>mxmldoc --man filename *.h *.c \
&gt;filename.man ENTER</kbd> &gt;filename.man ENTER</kbd>
<kbd>mxmldoc --man filename filename.xml *.h *.c \
&gt;filename.man ENTER</kbd>
</pre> </pre>
<h3>Creating Xcode Documentation Sets</h3>
<p>The <tt>--docset directory.docset</tt> option tells <tt>mxmldoc</tt> to <p>The <tt>--docset directory.docset</tt> option tells <tt>mxmldoc</tt> to
create an Xcode documentation set containing the HTML documentation, for create an Xcode documentation set containing the HTML documentation, for
example:</p> example:</p>
<pre> <pre>
<kbd>mxmldoc --docset ~/Library/Developer/Shared/Documentation/DocSets/foo.docset \ <kbd>mxmldoc --docset foo.docset *.h *.c foo.xml ENTER</kbd>
*.h *.c foo.xml ENTER</kbd>
</pre> </pre>
<blockquote><b>Note:</b>
<p>Xcode documentation sets can only be built on Mac OS X with Xcode 3.0 or <p>Xcode documentation sets can only be built on Mac OS X with Xcode 3.0 or
higher installed.</p> higher installed.</p>
</blockquote>
<h2>Commenting Your Code</h2> <h2>Commenting Your Code</h2>

@ -5,6 +5,41 @@
hspace="10" width="100" height="100" alt="B"></a>Release Notes</h1> hspace="10" width="100" height="100" alt="B"></a>Release Notes</h1>
<h2 _hd_omit_toc>Changes in Mini-XML 2.6</h2>
<ul>
<li>Documentation fixes (STR #91, STR #92)</li>
<li>The mxmldoc program did not handle typedef comments properly (STR
#72)</li>
<li>Added support for &quot;long long&quot; printf formats.</li>
<li>The XML parser now rejects UTF-8 XML files that start with a BOM
(STR #89)</li>
<li>The mxmldoc program now supports generating Xcode documentation
sets.</li>
<li>mxmlSave*() did not output UTF-8 correctly on some platforms.</li>
<li>mxmlNewXML() now adds encoding=&quot;utf-8&quot; in the ?xml
directive to avoid problems with non-conformant XML parsers that assume
something other than UTF-8 as the default encoding.</li>
<li>Wrapping was not disabled when mxmlSetWrapMargin(0) was called, and
&quot;&lt;?xml ... ?&gt;&quot; was always followed by a newline
(STR #76)</li>
<li>The mxml.pc.in file was broken (STR #79)</li>
<li>The mxmldoc program now handles &quot;typedef enum name {}
name&quot; correctly (STR #72)</li>
</ul>
<h2 _hd_omit_toc>Changes in Mini-XML 2.5</h2> <h2 _hd_omit_toc>Changes in Mini-XML 2.5</h2>
<ul> <ul>

@ -3,7 +3,7 @@
<head> <head>
<title>Mini-XML Programmers Manual</title> <title>Mini-XML Programmers Manual</title>
<meta name="author" content="Michael R Sweet"> <meta name="author" content="Michael R Sweet">
<meta name="copyright" content="Copyright 2003-2007"> <meta name="copyright" content="Copyright 2003-2009">
</head> </head>
<body> <body>
@ -11,7 +11,7 @@
<tr><td height="100%"> <tr><td height="100%">
<H1 ALIGN="CENTER"><FONT SIZE="-1">Mini-XML Programmers Manual<br> <H1 ALIGN="CENTER"><FONT SIZE="-1">Mini-XML Programmers Manual<br>
Version 2.3</H1> Version 2.6</H1>
<P ALIGN="CENTER">MICHAEL R. SWEET</P> <P ALIGN="CENTER">MICHAEL R. SWEET</P>
@ -19,9 +19,9 @@ Version 2.3</H1>
</table> </table>
<!-- NEW PAGE --> <!-- NEW PAGE -->
<P><FONT SIZE="+1"><B>Mini-XML Programmers Manual, Version 2.3</B></FONT></P> <P><FONT SIZE="+1"><B>Mini-XML Programmers Manual, Version 2.6</B></FONT></P>
<P><B>Copyright &copy; 2003-2007 by Michael R. Sweet</B></P> <P><B>Copyright &copy; 2003-2009 by Michael R. Sweet</B></P>
<P><SMALL>Permission is granted to copy, distribute and/or modify <P><SMALL>Permission is granted to copy, distribute and/or modify
this document under the terms of the GNU Library General Public this document under the terms of the GNU Library General Public

Loading…
Cancel
Save