|
|
|
@ -1,9 +1,9 @@ |
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> |
|
|
|
|
<HTML> |
|
|
|
|
<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="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"> |
|
|
|
|
<STYLE TYPE="text/css"><!-- |
|
|
|
|
BODY { font-family: sans-serif } |
|
|
|
@ -66,7 +66,12 @@ A { text-decoration: none } |
|
|
|
|
</UL> |
|
|
|
|
<B><A HREF="#MXMLDOC">Using the mxmldoc Utility</A></B> |
|
|
|
|
<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_3">Titles, Sections, and Introductions</A></LI> |
|
|
|
|
</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="#8_3_5">mxml_custom_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_index_t">mxml_index_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_event_t">mxml_sax_event_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> |
|
|
|
|
</UL> |
|
|
|
|
</LI> |
|
|
|
@ -178,7 +185,7 @@ A { text-decoration: none } |
|
|
|
|
<HR NOSHADE> |
|
|
|
|
<H1 align="right"><A name="INTRO"><IMG align="right" alt="0" height="100" |
|
|
|
|
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 |
|
|
|
|
your C and C++ applications.</P> |
|
|
|
|
<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> |
|
|
|
|
<UL> |
|
|
|
|
<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> |
|
|
|
|
</UL> |
|
|
|
|
<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 |
|
|
|
|
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> |
|
|
|
|
<P>This manual is organized into the following chapters and appendices:</P> |
|
|
|
|
<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 |
|
|
|
|
and their meanings and uses are explained below:</P> |
|
|
|
|
<DL> |
|
|
|
|
<DT><CODE>lpstat</CODE> |
|
|
|
|
<BR> <CODE>lpstat(1)</CODE></DT> |
|
|
|
|
<DT><CODE>mxmldoc</CODE> |
|
|
|
|
<BR> <CODE>mxmldoc(1)</CODE></DT> |
|
|
|
|
<DD>The names of commands; the first mention of a command or function in |
|
|
|
|
a chapter is followed by a manual page section number. |
|
|
|
|
<BR> |
|
|
|
|
<BR></DD> |
|
|
|
|
<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. |
|
|
|
|
<BR> |
|
|
|
|
<BR></DD> |
|
|
|
@ -312,15 +320,9 @@ libxml2</TT> library with something substantially smaller and |
|
|
|
|
|
|
|
|
|
<!-- NEED 6 --> |
|
|
|
|
<H2><A NAME="1_5">Legal Stuff</A></H2> |
|
|
|
|
<P>The Mini-XML library is copyright 2003-2008 by Michael Sweet.</P> |
|
|
|
|
<P>This library is free software; you can redistribute it and/or modify |
|
|
|
|
it under the terms of the <A href="#LICENSE">GNU Library General Public |
|
|
|
|
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> |
|
|
|
|
<P>The Mini-XML library is copyright 2003-2009 by Michael Sweet. License |
|
|
|
|
terms are described in <A href="#LICENSE">Appendix A - Mini-XML License</A> |
|
|
|
|
.</P> |
|
|
|
|
<HR NOSHADE> |
|
|
|
|
<H1 align="right"><A name="INSTALL"><IMG align="right" alt="1" height="100" |
|
|
|
|
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 |
|
|
|
|
text) 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> |
|
|
|
|
<element></TT>)</LI> |
|
|
|
|
<LI><TT>MXML_SAX_ELEMENT_OPEN</TT> - A close element was just read (<TT> |
|
|
|
|
<LI><TT>MXML_SAX_ELEMENT_CLOSE</TT> - A close element was just read (<TT> |
|
|
|
|
</element></TT>)</LI> |
|
|
|
|
<LI><TT>MXML_SAX_ELEMENT_OPEN</TT> - An open element was just read (<TT> |
|
|
|
|
<element></TT>)</LI> |
|
|
|
|
</UL> |
|
|
|
|
<P>Elements are<EM> released</EM> after the close element is processed. |
|
|
|
|
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> |
|
|
|
|
<KBD>mxmldoc filename.xml >filename.html ENTER</KBD> |
|
|
|
|
</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 |
|
|
|
|
man page instead of HTML documentation, for example:</P> |
|
|
|
|
<PRE> |
|
|
|
@ -1389,10 +1392,16 @@ hspace="10" src="4.gif" width="100"></A>Using the mxmldoc Utility</H1> |
|
|
|
|
|
|
|
|
|
<KBD>mxmldoc --man filename *.h *.c \ |
|
|
|
|
>filename.man ENTER</KBD> |
|
|
|
|
|
|
|
|
|
<KBD>mxmldoc --man filename filename.xml *.h *.c \ |
|
|
|
|
>filename.man ENTER</KBD> |
|
|
|
|
</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> |
|
|
|
|
<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> |
|
|
|
@ -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 |
|
|
|
|
required by section 6 of the LGPL.</LI> |
|
|
|
|
</OL> |
|
|
|
|
|
|
|
|
|
<!-- NEW PAGE --> |
|
|
|
|
<P align="center"><B>GNU LIBRARY GENERAL PUBLIC LICENSE</B></P> |
|
|
|
|
<P align="center">Version 2, June 1991 |
|
|
|
|
<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> |
|
|
|
|
<H1 align="right"><A name="RELNOTES"><IMG align="right" alt="B" height="100" |
|
|
|
|
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 "long long" 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="utf-8" 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 |
|
|
|
|
"<?xml ... ?>" 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 "typedef enum name {} name" |
|
|
|
|
correctly (STR #72)</LI> |
|
|
|
|
</UL> |
|
|
|
|
<H2><A NAME="7_2">Changes in Mini-XML 2.5</A></H2> |
|
|
|
|
<UL> |
|
|
|
|
<LI>The mxmldoc program now makes greater use of CSS and supports a |
|
|
|
|
--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> |
|
|
|
|
<LI>Spaces around the "=" in attributes were not supported (STR #67)</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Fixed shared library build problems on HP-UX and Mac OS X.</LI> |
|
|
|
|
<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 |
|
|
|
|
with a node with no children as the top node (STR #53)</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Added two exceptions to the LGPL to support static linking of |
|
|
|
|
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 |
|
|
|
|
characters would be lost</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>mxmlLoad*() did not treat custom data as opaque, so whitespace |
|
|
|
|
characters would be lost.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>mxmlLoadFd(), mxmlLoadFile(), and mxmlLoadString() now correctly |
|
|
|
|
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> |
|
|
|
|
<LI>Fixed a MingW/Cygwin compilation problem (STR #18)</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Added shared library support (STR #17)</LI> |
|
|
|
|
<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 ("--->" is not |
|
|
|
|
allowed)</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Added support for custom data nodes (STR #6)</LI> |
|
|
|
|
<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>Fixed multi-word UTF-16 handling.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>New programmers manual.</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 |
|
|
|
|
and installing with MingW.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Fixes for mxmldoc.</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 |
|
|
|
|
attribute name strings properly, e.g. for !DOCTYPE declarations.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Added new "set" methods to set the value of a node.</LI> |
|
|
|
|
<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 |
|
|
|
|
snprintf() and vsnprintf() function checks.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>The mxml(3) man page wasn't updated for the string functions.</LI> |
|
|
|
|
<LI>mxmlSaveString() returned the wrong number of characters.</LI> |
|
|
|
|
<LI>mxml_add_char() updated the buffer pointer in the wrong place.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>The private mxml_add_ch() function did not update the |
|
|
|
|
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 |
|
|
|
|
node tree to an allocated string.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>The mxmlLoadFile() function now uses dynamically allocated string |
|
|
|
|
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 |
|
|
|
|
function.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>The mxmldoc program now handles function arguments, structures, |
|
|
|
|
unions, enumerations, classes, and typedefs properly.</LI> |
|
|
|
@ -2140,7 +2171,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1> |
|
|
|
|
code.</LI> |
|
|
|
|
<LI>Added man pages and packaging files.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>New mxmldoc example program that is also used to create and update |
|
|
|
|
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 |
|
|
|
|
human-readable XML output under program control.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>mxmlSaveFile() didn't return a value on success.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>mxmlWalkNext() would go into an infinite loop.</LI> |
|
|
|
|
</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> |
|
|
|
|
<LI>Initial public release.</LI> |
|
|
|
|
</UL> |
|
|
|
@ -2299,6 +2330,8 @@ mxml_custom_save_cb_t</A></LI> |
|
|
|
|
</LI> |
|
|
|
|
<LI><A href="#mxml_element_t" title="An XML element value."> |
|
|
|
|
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"> |
|
|
|
|
mxml_error_cb_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> |
|
|
|
|
<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> |
|
|
|
|
</UL> |
|
|
|
|
</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> |
|
|
|
|
</UL> |
|
|
|
|
</LI> |
|
|
|
|
</UL> |
|
|
|
|
<H2 class="title"><A name="FUNCTIONS">Functions</A></H2> |
|
|
|
|
<H3 class="function"><A name="mxmlAdd">mxmlAdd</A></H3> |
|
|
|
|
<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"> |
|
|
|
|
mxmlEntityAddCallback</A></H3> |
|
|
|
|
<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> <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> |
|
|
|
|
<P class="description">0 on success, -1 on failure</P> |
|
|
|
|
<H3 class="function"><A name="mxmlEntityGetName">mxmlEntityGetName</A></H3> |
|
|
|
@ -2504,7 +2544,14 @@ mxmlEntityAddCallback</A></H3> |
|
|
|
|
<H3 class="function"><A name="mxmlEntityRemoveCallback"> |
|
|
|
|
mxmlEntityRemoveCallback</A></H3> |
|
|
|
|
<P class="description">Remove a callback.</P> |
|
|
|
|
<P class="code"> void mxmlEntityRemoveCallback (void);</P> |
|
|
|
|
<P class="code"> void mxmlEntityRemoveCallback ( |
|
|
|
|
<BR> <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> |
|
|
|
|
<P class="description">Find the named element.</P> |
|
|
|
|
<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> |
|
|
|
|
<DL> |
|
|
|
|
<DT>column</DT> |
|
|
|
|
<DD class="description">Column for wrapping</DD> |
|
|
|
|
<DD class="description">Column for wrapping, 0 to disable wrapping</DD> |
|
|
|
|
</DL> |
|
|
|
|
<H4 class="discussion">Discussion</H4> |
|
|
|
|
<P class="discussion">Wrapping is disabled when "column" is <= 0.</P> |
|
|
|
|
<P class="discussion">Wrapping is disabled when "column" is 0.</P> |
|
|
|
|
<H3 class="function"><A name="mxmlWalkNext">mxmlWalkNext</A></H3> |
|
|
|
|
<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 ( |
|
|
|
@ -3484,6 +3531,9 @@ mxml_node_t</A> *);</P> |
|
|
|
|
<P class="description">An XML element value.</P> |
|
|
|
|
<P class="code"> typedef struct <A href="#mxml_element_s">mxml_element_s</A> |
|
|
|
|
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> |
|
|
|
|
<P class="description">Error callback function</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> |
|
|
|
|
<H3 class="typedef"><A name="mxml_load_cb_t">mxml_load_cb_t</A></H3> |
|
|
|
|
<P class="description">Load callback function</P> |
|
|
|
|
<P class="code"> typedef mxml_type_t (*mxml_load_cb_t)(<A href="#mxml_node_t"> |
|
|
|
|
mxml_node_t</A> *);</P> |
|
|
|
|
<P class="code"> typedef <A href="#mxml_type_t">mxml_type_t</A> |
|
|
|
|
(*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> |
|
|
|
|
<P class="description">An XML node.</P> |
|
|
|
|
<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="code"> typedef struct <A href="#mxml_text_s">mxml_text_s</A> |
|
|
|
|
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> |
|
|
|
|
<P class="description">An XML node value.</P> |
|
|
|
|
<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> struct <A href="#mxml_node_s">mxml_node_s</A> *parent; |
|
|
|
|
<BR> struct <A href="#mxml_node_s">mxml_node_s</A> *prev; |
|
|
|
|
<BR> int ref_count; |
|
|
|
|
<BR> mxml_type_t type; |
|
|
|
|
<BR> <A href="#mxml_type_t">mxml_type_t</A> type; |
|
|
|
|
<BR> void *user_data; |
|
|
|
|
<BR> <A href="#mxml_value_t">mxml_value_t</A> value; |
|
|
|
|
<BR> };</P> |
|
|
|
@ -3703,6 +3757,7 @@ mxml_sax_event_e</A> mxml_sax_event_t;</P> |
|
|
|
|
<DT>MXML_TEXT</DT> |
|
|
|
|
<DD class="description">Text fragment</DD> |
|
|
|
|
</DL> |
|
|
|
|
</UL> |
|
|
|
|
</DIV><HR NOSHADE> |
|
|
|
|
<H1 align="right"><A name="SCHEMA"><IMG align="right" alt="D" height="100" |
|
|
|
|
hspace="10" src="D.gif" width="100"></A>XML Schema</H1> |
|
|
|
|