mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 23:35:30 +00:00
Update separate files docos and search stuff.
This commit is contained in:
parent
95124f4331
commit
21cdbb457c
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -76,7 +76,7 @@ MXML_REAL</TT>, or <TT>MXML_TEXT</TT>. The function is called<I> after</I>
|
||||
|
||||
type = mxmlElementGetAttr(node, "type");
|
||||
if (type == NULL)
|
||||
type = node->value.element.name;
|
||||
type = mxmlGetElement(node);
|
||||
|
||||
if (!strcmp(type, "integer"))
|
||||
return (MXML_INTEGER);
|
||||
@ -127,7 +127,7 @@ MXML_WS_BEFORE_CLOSE</TT>, or <TT>MXML_WS_AFTER_CLOSE</TT>. The callback
|
||||
* just common HTML elements...
|
||||
*/
|
||||
|
||||
name = node->value.element.name;
|
||||
name = mxmlGetElement(node);
|
||||
|
||||
if (!strcmp(name, "html") ||
|
||||
!strcmp(name, "head") ||
|
||||
@ -291,8 +291,7 @@ MXML_WS_BEFORE_CLOSE</TT>, or <TT>MXML_WS_AFTER_CLOSE</TT>. The callback
|
||||
* function pointers...
|
||||
*/
|
||||
|
||||
node->value.custom.data = dt;
|
||||
node->value.custom.destroy = free;
|
||||
mxmlSetCustom(node, data, destroy);
|
||||
|
||||
/*
|
||||
* Return with no errors...
|
||||
@ -306,6 +305,8 @@ MXML_WS_BEFORE_CLOSE</TT>, or <TT>MXML_WS_AFTER_CLOSE</TT>. The callback
|
||||
contain a <TT>void</TT> pointer to the allocated custom data for the
|
||||
node and a pointer to a destructor function which will free the custom
|
||||
data when the node is deleted.</P>
|
||||
|
||||
<!-- NEED 15 -->
|
||||
<P>The save callback receives the node pointer and returns an allocated
|
||||
string containing the custom data value. The following save callback
|
||||
could be used for our ISO date/time type:</P>
|
||||
@ -317,7 +318,7 @@ MXML_WS_BEFORE_CLOSE</TT>, or <TT>MXML_WS_AFTER_CLOSE</TT>. The callback
|
||||
iso_date_time_t *dt;
|
||||
|
||||
|
||||
dt = (iso_date_time_t *)node->custom.data;
|
||||
dt = (iso_date_time_t *)mxmlGetCustom(node);
|
||||
|
||||
snprintf(data, sizeof(data),
|
||||
"%04u-%02u-%02uT%02u:%02u:%02uZ",
|
||||
@ -512,7 +513,7 @@ mxmlIndexEnum</TT>.</P>
|
||||
* Retain headings and titles...
|
||||
*/
|
||||
|
||||
char *name = node->value.element.name;
|
||||
char *name = mxmlGetElement(node);
|
||||
|
||||
if (!strcmp(name, "html") ||
|
||||
!strcmp(name, "head") ||
|
||||
@ -528,15 +529,17 @@ mxmlIndexEnum</TT>.</P>
|
||||
}
|
||||
else if (event == MXML_SAX_DIRECTIVE)
|
||||
mxmlRetain(node);
|
||||
else if (event == MXML_SAX_DATA &&
|
||||
node->parent->ref_count > 1)
|
||||
else if (event == MXML_SAX_DATA)
|
||||
{
|
||||
/*
|
||||
* If the parent was retained, then retain
|
||||
* this data node as well.
|
||||
*/
|
||||
if (mxmlGetRefCount(mxmlGetParent(node)) > 1)
|
||||
{
|
||||
/*
|
||||
* If the parent was retained, then retain
|
||||
* this data node as well.
|
||||
*/
|
||||
|
||||
mxmlRetain(node);
|
||||
mxmlRetain(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
@ -564,9 +567,9 @@ mxmlIndexEnum</TT>.</P>
|
||||
|
||||
if (body)
|
||||
{
|
||||
for (heading = body->child;
|
||||
for (heading = mxmlGetFirstChild(body);
|
||||
heading;
|
||||
heading = heading->next)
|
||||
heading = mxmlGetNextSibling(heading))
|
||||
print_children(heading);
|
||||
}
|
||||
</PRE>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -39,7 +39,7 @@ hspace="10" src="2.gif" width="100"></A>Getting Started with Mini-XML</H1>
|
||||
<LI>Writing of UTF-8 encoded XML files and strings.</LI>
|
||||
<LI>Support for arbitrary element names, attributes, and attribute
|
||||
values with no preset limits, just available memory.</LI>
|
||||
<LI>Support for integer, real, opaque ("cdata"), and text data types in
|
||||
<LI>Support for integer, real, opaque ("CDATA"), and text data types in
|
||||
"leaf" nodes.</LI>
|
||||
<LI>"Find", "index", and "walk" functions for easily accessing data in
|
||||
an XML document.</LI>
|
||||
@ -66,50 +66,14 @@ hspace="10" src="2.gif" width="100"></A>Getting Started with Mini-XML</H1>
|
||||
<KBD>pkg-config --libs mxml ENTER</KBD>
|
||||
</PRE>
|
||||
<H2><A NAME="3_2">Nodes</A></H2>
|
||||
<P>Every piece of information in an XML file (elements, text, numbers)
|
||||
is stored in memory in "nodes". Nodes are defined by the <A href="reference.html#mxml_node_t">
|
||||
<TT>mxml_node_t</TT></A> structure. The <A href="reference.html#mxml_type_t">
|
||||
<TT>type</TT></A> member defines the node type (element, integer,
|
||||
opaque, real, or text) which determines which value you want to look at
|
||||
in the <A href="reference.html#mxml_value_t"><TT>value</TT></A> union.</P>
|
||||
|
||||
<!-- NEED 10 -->
|
||||
<CENTER>
|
||||
<TABLE border="1" cellpadding="5" cellspacing="0" summary="Mini-XML Node Value Members"
|
||||
width="80%"><CAPTION align="bottom"><I> Table 2-1: Mini-XML Node Value
|
||||
Members</I></CAPTION>
|
||||
<TR bgcolor="#cccccc"><TH>Value</TH><TH>Type</TH><TH>Node member</TH></TR>
|
||||
<TR><TD>Custom</TD><TD><TT>void *</TT></TD><TD><TT>
|
||||
node->value.custom.data</TT></TD></TR>
|
||||
<TR><TD>Element</TD><TD><TT>char *</TT></TD><TD><TT>
|
||||
node->value.element.name</TT></TD></TR>
|
||||
<TR><TD>Integer</TD><TD><TT>int</TT></TD><TD><TT>node->value.integer</TT>
|
||||
</TD></TR>
|
||||
<TR><TD>Opaque (string)</TD><TD><TT>char *</TT></TD><TD><TT>
|
||||
node->value.opaque</TT></TD></TR>
|
||||
<TR><TD>Real</TD><TD><TT>double</TT></TD><TD><TT>node->value.real</TT></TD>
|
||||
</TR>
|
||||
<TR><TD>Text</TD><TD><TT>char *</TT></TD><TD><TT>node->value.text.string</TT>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<P>Each node also has a <TT>user_data</TT> member which allows you to
|
||||
associate application-specific data with each node as needed.</P>
|
||||
<P>New nodes are created using the <A href="reference.html#mxmlNewElement">
|
||||
<TT>mxmlNewElement</TT></A>, <A href="reference.html#mxmlNewInteger"><TT>
|
||||
mxmlNewInteger</TT></A>, <A href="reference.html#mxmlNewOpaque"><TT>
|
||||
mxmlNewOpaque</TT></A>, <A href="reference.html#mxmlNewReal"><TT>
|
||||
mxmlNewReal</TT></A>, <A href="reference.html#mxmlNewText"><TT>
|
||||
mxmlNewText</TT></A> <A href="reference.html#mxmlNewTextf"><TT>
|
||||
mxmlNewTextf</TT></A> <A href="reference.html#mxmlNewXML"><TT>mxmlNewXML</TT>
|
||||
</A> functions. Only elements can have child nodes, and the top node
|
||||
must be an element, usually the <TT><?xml version="1.0"?></TT> node
|
||||
created by <TT>mxmlNewXML()</TT>.</P>
|
||||
<P>Nodes have pointers to the node above (<TT>parent</TT>), below (<TT>
|
||||
child</TT>), left (<TT>prev</TT>), and right (<TT>next</TT>) of the
|
||||
current node. If you have an XML file like the following:</P>
|
||||
<P>Every piece of information in an XML file is stored in memory in
|
||||
"nodes". Nodes are defined by the <A href="reference.html#mxml_node_t"><TT>
|
||||
mxml_node_t</TT></A> structure. Each node has a typed value, optional
|
||||
user data, a parent node, sibling nodes (previous and next), and
|
||||
potentially child nodes.</P>
|
||||
<P>For example, if you have an XML file like the following:</P>
|
||||
<PRE>
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<data>
|
||||
<node>val1</node>
|
||||
<node>val2</node>
|
||||
@ -125,7 +89,7 @@ child</TT>), left (<TT>prev</TT>), and right (<TT>next</TT>) of the
|
||||
</PRE>
|
||||
<P>the node tree for the file would look like the following in memory:</P>
|
||||
<PRE>
|
||||
?xml
|
||||
?xml version="1.0" encoding="utf-8"?
|
||||
|
|
||||
data
|
||||
|
|
||||
@ -137,15 +101,100 @@ child</TT>), left (<TT>prev</TT>), and right (<TT>next</TT>) of the
|
||||
| | |
|
||||
val4 val5 val6
|
||||
</PRE>
|
||||
<P>where "-" is a pointer to the next node and "|" is a pointer to the
|
||||
first child node.</P>
|
||||
<P>Once you are done with the XML data, use the <A href="reference.html#mxmlDelete">
|
||||
<TT>mxmlDelete</TT></A> function to recursively free the memory that is
|
||||
used for a particular node or the entire tree:</P>
|
||||
<PRE>
|
||||
mxmlDelete(tree);
|
||||
</PRE>
|
||||
<P>where "-" is a pointer to the sibling node and "|" is a pointer to
|
||||
the first child or parent node.</P>
|
||||
<P>The <A href="reference.html#mxmlGetType"><TT>mxmlGetType</TT></A>
|
||||
function gets the type of a node, one of <TT>MXML_CUSTOM</TT>, <TT>
|
||||
MXML_ELEMENT</TT>, <TT>MXML_INTEGER</TT>, <TT>MXML_OPAQUE</TT>, <TT>
|
||||
MXML_REAL</TT>, or <TT>MXML_TEXT</TT>. The parent and sibling nodes are
|
||||
accessed using the <A href="reference.html#mxmlGetParent"><TT>
|
||||
mxmlGetParent</TT></A>, <A href="#mxmlGetNext"><TT>mxmlGetNext</TT></A>,
|
||||
and <A href="#mxmlGetPrevious"><TT>mxmlGetPrevious</TT></A> functions.
|
||||
The <A href="reference.html#mxmlGetUserData"><TT>mxmlGetUserData</TT></A>
|
||||
function gets any user data associated with the node.</P>
|
||||
<H3><A NAME="3_2_1">CDATA Nodes</A></H3>
|
||||
<P>CDATA (<TT>MXML_ELEMENT</TT>) nodes are created using the <A href="reference.html#mxmlNewCDATA">
|
||||
<TT>mxmlNewCDATA</TT></A> function. The <A href="reference.html#mxmlGetCDATA">
|
||||
<TT>mxmlGetCDATA</TT></A> function retrieves the CDATA string pointer
|
||||
for a node.</P>
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
<P>CDATA nodes are currently stored in memory as special elements. This
|
||||
will be changed in a future major release of Mini-XML.</P>
|
||||
</BLOCKQUOTE>
|
||||
<H3><A NAME="3_2_2">Custom Nodes</A></H3>
|
||||
<P>Custom (<TT>MXML_CUSTOM</TT>) nodes are created using the <A href="reference.html#mxmlNewCustom">
|
||||
<TT>mxmlNewCustom</TT></A> function or using a custom load callback
|
||||
specified using the <A href="reference.html#mxmlSetCustomHandlers"><TT>
|
||||
mxmlSetCustomHandlers</TT></A> function. The <A href="reference.html#mxmlGetCustom">
|
||||
<TT>mxmlGetCustom</TT></A> function retrieves the custom value pointer
|
||||
for a node.</P>
|
||||
<H3><A NAME="3_2_3">Comment Nodes</A></H3>
|
||||
<P>Comment (<TT>MXML_ELEMENT</TT>) nodes are created using the <A href="reference.html#mxmlNewElement">
|
||||
<TT>mxmlNewElement</TT></A> function. The <A href="reference.html#mxmlGetElement">
|
||||
<TT>mxmlGetElement</TT></A> function retrieves the comment string
|
||||
pointer for a node, including the surrounding "!--" and "--"
|
||||
characters.</P>
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
<P>Comment nodes are currently stored in memory as special elements.
|
||||
This will be changed in a future major release of Mini-XML.</P>
|
||||
</BLOCKQUOTE>
|
||||
<H3><A NAME="3_2_4">Element Nodes</A></H3>
|
||||
<P>Element (<TT>MXML_ELEMENT</TT>) nodes are created using the <A href="reference.html#mxmlNewElement">
|
||||
<TT>mxmlNewElement</TT></A> function. The <A href="reference.html#mxmlGetElement">
|
||||
<TT>mxmlGetElement</TT></A> function retrieves the element name, the <A href="reference.html#mxmlElementGetAttr">
|
||||
<TT>mxmlElementGetAttr</TT></A> function retrieves the value string for
|
||||
a named attribute associated with the element, and the <A href="reference.html#mxmlGetFirstChild">
|
||||
<TT>mxmlGetFirstChild</TT></A> and <A href="reference.html#mxmlGetLastChild">
|
||||
<TT>mxmlGetLastChild</TT></A> functions retrieve the first and last
|
||||
child nodes for the element, respectively.</P>
|
||||
<H3><A NAME="3_2_5">Integer Nodes</A></H3>
|
||||
<P>Integer (<TT>MXML_INTEGER</TT>) nodes are created using the <A href="reference.html#mxmlNewInteger">
|
||||
<TT>mxmlNewInteger</TT></A> function. The <A href="reference.html#mxmlGetInteger">
|
||||
<TT>mxmlGetInteger</TT></A> function retrieves the integer value for a
|
||||
node.</P>
|
||||
<H3><A NAME="3_2_6">Opaque Nodes</A></H3>
|
||||
<P>Opaque (<TT>MXML_OPAQUE</TT>) nodes are created using the <A href="reference.html#mxmlNewOpaque">
|
||||
<TT>mxmlNewOpaque</TT></A> function. The <A href="reference.html#mxmlGetOpaque">
|
||||
<TT>mxmlGetOpaque</TT></A> function retrieves the opaque string pointer
|
||||
for a node. Opaque nodes are like string nodes but preserve all
|
||||
whitespace between nodes.</P>
|
||||
<H3><A NAME="3_2_7">Text Nodes</A></H3>
|
||||
<P>Text (<TT>MXML_TEXT</TT>) nodes are created using the <A href="reference.html#mxmlNewText">
|
||||
<TT>mxmlNewText</TT></A> and <A href="reference.html#mxmlNewTextf"><TT>
|
||||
mxmlNewTextf</TT></A> functions. Each text node consists of a text
|
||||
string and (leading) whitespace value - the <A href="reference.html#mxmlGetText">
|
||||
<TT>mxmlGetText</TT></A> function retrieves the text string pointer and
|
||||
whitespace value for a node.</P>
|
||||
|
||||
<!-- NEED 12 -->
|
||||
<H3><A NAME="3_2_8">Processing Instruction Nodes</A></H3>
|
||||
<P>Processing instruction (<TT>MXML_ELEMENT</TT>) nodes are created
|
||||
using the <A href="reference.html#mxmlNewElement"><TT>mxmlNewElement</TT>
|
||||
</A> function. The <A href="reference.html#mxmlGetElement"><TT>
|
||||
mxmlGetElement</TT></A> function retrieves the processing instruction
|
||||
string for a node, including the surrounding "?" characters.</P>
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
<P>Processing instruction nodes are currently stored in memory as
|
||||
special elements. This will be changed in a future major release of
|
||||
Mini-XML.</P>
|
||||
</BLOCKQUOTE>
|
||||
<H3><A NAME="3_2_9">Real Number Nodes</A></H3>
|
||||
<P>Real number (<TT>MXML_REAL</TT>) nodes are created using the <A href="reference.html#mxmlNewReal">
|
||||
<TT>mxmlNewReal</TT></A> function. The <A href="reference.html#mxmlGetReal">
|
||||
<TT>mxmlGetReal</TT></A> function retrieves the CDATA string pointer for
|
||||
a node.</P>
|
||||
|
||||
<!-- NEED 15 -->
|
||||
<H3><A NAME="3_2_10">XML Declaration Nodes</A></H3>
|
||||
<P>XML declaration (<TT>MXML_ELEMENT</TT>) nodes are created using the <A
|
||||
href="reference.html#mxmlNewXML"><TT>mxmlNewXML</TT></A> function. The <A
|
||||
href="reference.html#mxmlGetElement"><TT>mxmlGetElement</TT></A>
|
||||
function retrieves the XML declaration string for a node, including the
|
||||
surrounding "?" characters.</P>
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
<P>XML declaration nodes are currently stored in memory as special
|
||||
elements. This will be changed in a future major release of Mini-XML.</P>
|
||||
</BLOCKQUOTE>
|
||||
<!-- NEW PAGE -->
|
||||
<H2><A NAME="3_3">Creating XML Documents</A></H2>
|
||||
<P>You can create and update XML documents in memory using the various <TT>
|
||||
@ -182,9 +231,11 @@ mxmlNew</TT> functions. The following code will create the XML document
|
||||
node = mxmlNewElement(data, "node");
|
||||
mxmlNewText(node, 0, "val8");
|
||||
</PRE>
|
||||
<P>We start by creating the <TT><?xml version="1.0"?></TT> node common
|
||||
to all XML files using the <A href="reference.html#mxmlNewXML"><TT>
|
||||
mxmlNewXML</TT></A> function:</P>
|
||||
|
||||
<!-- NEED 6 -->
|
||||
<P>We start by creating the declaration node common to all XML files
|
||||
using the <A href="reference.html#mxmlNewXML"><TT>mxmlNewXML</TT></A>
|
||||
function:</P>
|
||||
<PRE>
|
||||
xml = mxmlNewXML("1.0");
|
||||
</PRE>
|
||||
@ -208,7 +259,7 @@ mxmlNewText</TT></A> functions. The first argument of <TT>mxmlNewText</TT>
|
||||
<P>The resulting in-memory XML document can then be saved or processed
|
||||
just like one loaded from disk or a string.</P>
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
<!-- NEED 15 -->
|
||||
<H2><A NAME="3_4">Loading XML</A></H2>
|
||||
<P>You load an XML file using the <A href="reference.html#mxmlLoadFile"><TT>
|
||||
mxmlLoadFile</TT></A> function:</P>
|
||||
@ -256,7 +307,7 @@ mxmlLoadFile()</TT>. The second argument specifies the string or
|
||||
character buffer to load and must be a complete XML document including
|
||||
the <TT>?xml</TT> element if the parent node is <TT>NULL</TT>.</P>
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
<!-- NEED 15 -->
|
||||
<H2><A NAME="3_5">Saving XML</A></H2>
|
||||
<P>You save an XML file using the <A href="reference.html#mxmlSaveFile"><TT>
|
||||
mxmlSaveFile</TT></A> function:</P>
|
||||
@ -297,6 +348,8 @@ mxmlSaveFile()</TT>. The <TT>mxmlSaveString</TT> function takes pointer
|
||||
and size arguments for saving the XML document to a fixed-size buffer,
|
||||
while <TT>mxmlSaveAllocString()</TT> returns a string buffer that was
|
||||
allocated using <TT>malloc()</TT>.</P>
|
||||
|
||||
<!-- NEED 15 -->
|
||||
<H3><A NAME="3_5_1">Controlling Line Wrapping</A></H3>
|
||||
<P>When saving XML documents, Mini-XML normally wraps output lines at
|
||||
column 75 so that the text is readable in terminal windows. The <A href="reference.html#mxmlSetWrapMargin">
|
||||
@ -309,9 +362,23 @@ mxmlSaveFile()</TT>. The <TT>mxmlSaveString</TT> function takes pointer
|
||||
/* Disable wrapping */
|
||||
mxmlSetWrapMargin(0);
|
||||
</PRE>
|
||||
<H2><A NAME="3_6">Memory Management</A></H2>
|
||||
<P>Once you are done with the XML data, use the <A href="reference.html#mxmlDelete">
|
||||
<TT>mxmlDelete</TT></A> function to recursively free the memory that is
|
||||
used for a particular node or the entire tree:</P>
|
||||
<PRE>
|
||||
mxmlDelete(tree);
|
||||
</PRE>
|
||||
<P>You can also use reference counting to manage memory usage. The <A href="reference.html#mxmlRetain">
|
||||
<TT>mxmlRetain</TT></A> and <A href="reference.html#mxmlRelease"><TT>
|
||||
mxmlRelease</TT></A> functions increment and decrement a node's use
|
||||
count, respectively. When the use count goes to 0, <TT>mxmlRelease</TT>
|
||||
will automatically call <TT>mxmlDelete</TT> to actually free the memory
|
||||
used by the node tree. New nodes automatically start with a use count
|
||||
of 1.</P>
|
||||
|
||||
<!-- NEW PAGE-->
|
||||
<H2><A NAME="3_6">Finding and Iterating Nodes</A></H2>
|
||||
<H2><A NAME="3_7">Finding and Iterating Nodes</A></H2>
|
||||
<P>The <A href="reference.html#mxmlWalkPrev"><TT>mxmlWalkPrev</TT></A>
|
||||
and <A href="reference.html#mxmlWalkNext"><TT>mxmlWalkNext</TT></A>
|
||||
functions can be used to iterate through the XML node tree:</P>
|
||||
@ -433,6 +500,18 @@ functions can be used to iterate through the XML node tree:</P>
|
||||
the order would be reversed, ending at "?xml".</P>
|
||||
</LI>
|
||||
</UL>
|
||||
<H2><A NAME="3_8">Finding Specific Nodes</A></H2>
|
||||
<P>You can find specific nodes in the tree using the <A href="#mxmlFindValue">
|
||||
<TT>mxmlFindPath</TT></A>, for example:</P>
|
||||
<PRE>
|
||||
mxml_node_t *value;
|
||||
|
||||
value = mxmlFindPath(tree, "path/to/*/foo/bar");
|
||||
</PRE>
|
||||
<P>The second argument is a "path" to the parent node. Each component of
|
||||
the path is separated by a slash (/) and represents a named element in
|
||||
the document tree or a wildcard (*) path representing 0 or more
|
||||
intervening nodes.</P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="index.html">Contents</A>
|
||||
<A HREF="install.html">Previous</A>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -47,7 +47,20 @@ A { text-decoration: none }
|
||||
<B><A HREF="basics.html#BASICS">Getting Started with Mini-XML</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="basics.html#3_1">The Basics</A></LI>
|
||||
<LI><A HREF="basics.html#3_2">Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2">Nodes</A>
|
||||
<UL>
|
||||
<LI><A HREF="basics.html#3_2_1">CDATA Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_2">Custom Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_3">Comment Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_4">Element Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_5">Integer Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_6">Opaque Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_7">Text Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_8">Processing Instruction Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_9">Real Number Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_2_10">XML Declaration Nodes</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A HREF="basics.html#3_3">Creating XML Documents</A></LI>
|
||||
<LI><A HREF="basics.html#3_4">Loading XML</A></LI>
|
||||
<LI><A HREF="basics.html#3_5">Saving XML</A>
|
||||
@ -55,7 +68,9 @@ A { text-decoration: none }
|
||||
<LI><A HREF="basics.html#3_5_1">Controlling Line Wrapping</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A HREF="basics.html#3_6">Finding and Iterating Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_6">Memory Management</A></LI>
|
||||
<LI><A HREF="basics.html#3_7">Finding and Iterating Nodes</A></LI>
|
||||
<LI><A HREF="basics.html#3_8">Finding Specific Nodes</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="advanced.html#ADVANCED">More Mini-XML Programming Techniques</A>
|
||||
</B>
|
||||
@ -101,35 +116,52 @@ A { text-decoration: none }
|
||||
<LI><A HREF="reference.html#mxmlEntityRemoveCallback">
|
||||
mxmlEntityRemoveCallback</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlFindElement">mxmlFindElement</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_12">mxmlFindPath</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_13">mxmlGetCDATA</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_14">mxmlGetCustom</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_15">mxmlGetElement</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_16">mxmlGetFirstChild</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_17">mxmlGetInteger</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_18">mxmlGetLastChild</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlGetNextSibling">mxmlGetNextSibling</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_20">mxmlGetOpaque</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_21">mxmlGetParent</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_22">mxmlGetPrevSibling</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_23">mxmlGetReal</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_24">mxmlGetRefCount</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_25">mxmlGetText</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_26">mxmlGetType</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_27">mxmlGetUserData</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlIndexDelete">mxmlIndexDelete</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlIndexEnum">mxmlIndexEnum</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlIndexFind">mxmlIndexFind</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_31">mxmlIndexGetCount</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlIndexNew">mxmlIndexNew</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlIndexReset">mxmlIndexReset</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlLoadFd">mxmlLoadFd</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlLoadFile">mxmlLoadFile</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlLoadString">mxmlLoadString</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_20">mxmlNewCDATA</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_21">mxmlNewCustom</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_37">mxmlNewCDATA</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_38">mxmlNewCustom</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlNewElement">mxmlNewElement</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlNewInteger">mxmlNewInteger</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlNewOpaque">mxmlNewOpaque</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlNewReal">mxmlNewReal</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlNewText">mxmlNewText</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlNewTextf">mxmlNewTextf</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_28">mxmlNewXML</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_29">mxmlRelease</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_45">mxmlNewXML</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_46">mxmlRelease</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlRemove">mxmlRemove</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_31">mxmlRetain</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_32">mxmlSAXLoadFd</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_33">mxmlSAXLoadFile</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_34">mxmlSAXLoadString</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_48">mxmlRetain</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_49">mxmlSAXLoadFd</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_50">mxmlSAXLoadFile</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_51">mxmlSAXLoadString</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSaveAllocString">mxmlSaveAllocString</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSaveFd">mxmlSaveFd</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSaveFile">mxmlSaveFile</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSaveString">mxmlSaveString</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_39">mxmlSetCDATA</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_40">mxmlSetCustom</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_56">mxmlSetCDATA</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_57">mxmlSetCustom</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSetCustomHandlers">mxmlSetCustomHandlers</A>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#mxmlSetElement">mxmlSetElement</A></LI>
|
||||
@ -140,22 +172,20 @@ mxmlEntityRemoveCallback</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSetReal">mxmlSetReal</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSetText">mxmlSetText</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlSetTextf">mxmlSetTextf</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_49">mxmlSetWrapMargin</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_66">mxmlSetUserData</A></LI>
|
||||
<LI><A HREF="reference.html#8_2_67">mxmlSetWrapMargin</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlWalkNext">mxmlWalkNext</A></LI>
|
||||
<LI><A HREF="reference.html#mxmlWalkPrev">mxmlWalkPrev</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#TYPES">Data Types</A>
|
||||
<UL>
|
||||
<LI><A HREF="reference.html#mxml_attr_t">mxml_attr_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_custom_destroy_cb_t">
|
||||
mxml_custom_destroy_cb_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_custom_load_cb_t">mxml_custom_load_cb_t</A>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#mxml_custom_save_cb_t">mxml_custom_save_cb_t</A>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#8_3_5">mxml_custom_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_element_t">mxml_element_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_entity_cb_t">mxml_entity_cb_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_error_cb_t">mxml_error_cb_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_index_t">mxml_index_t</A></LI>
|
||||
@ -164,24 +194,7 @@ mxml_custom_destroy_cb_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_save_cb_t">mxml_save_cb_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_sax_cb_t">mxml_sax_cb_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_sax_event_t">mxml_sax_event_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_text_t">mxml_text_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_type_t">mxml_type_t</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_value_t">mxml_value_t</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#STRUCTURES">Structures</A>
|
||||
<UL>
|
||||
<LI><A HREF="reference.html#mxml_attr_s">mxml_attr_s</A></LI>
|
||||
<LI><A HREF="reference.html#8_4_2">mxml_custom_s</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_element_s">mxml_element_s</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_index_s">mxml_index_s</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_node_s">mxml_node_s</A></LI>
|
||||
<LI><A HREF="reference.html#mxml_text_s">mxml_text_s</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#UNIONS">Unions</A>
|
||||
<UL>
|
||||
<LI><A HREF="reference.html#mxml_value_u">mxml_value_u</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A HREF="reference.html#ENUMERATIONS">Constants</A>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -92,7 +92,7 @@ rpmbuild(8)</TT> software to create Red Hat Package Manager ("RPM")
|
||||
epm(1)</TT> program to create software packages in a variety of formats.
|
||||
The <TT>epm</TT> program is available from the following URL:</P>
|
||||
<PRE>
|
||||
<A href="http://www.easysw.com/epm/">http://www.easysw.com/epm/</A>
|
||||
<A href="http://www.epmhome.org/">http://www.epmhome.org/</A>
|
||||
</PRE>
|
||||
<P>Use the <TT>make</TT> command with the <KBD>epm</KBD> target to
|
||||
create portable and native packages for your system:</P>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -28,7 +28,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.6, a small XML
|
||||
<P>This programmers manual describes Mini-XML version 2.7, 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/">
|
||||
@ -48,12 +48,12 @@ libxml2</TT> library with something substantially smaller and
|
||||
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 3,441 lines of code,
|
||||
implementation and now stands at a whopping 3,965 lines of code,
|
||||
compared to 103,893 lines of code for libxml2 version 2.6.9.</P>
|
||||
<P>Aside from Gutenprint, Mini-XML is used for the following
|
||||
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/">CUPS</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
|
||||
@ -165,7 +165,7 @@ 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-2009 by Michael Sweet. License
|
||||
<P>The Mini-XML library is copyright 2003-2011 by Michael Sweet. License
|
||||
terms are described in <A href="license.html#LICENSE">Appendix A -
|
||||
Mini-XML License</A>.</P>
|
||||
<HR NOSHADE>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -31,24 +31,21 @@ A { text-decoration: none }
|
||||
<H1 align="right"><A name="LICENSE"><IMG align="right" alt="A" height="100"
|
||||
hspace="10" src="A.gif" width="100"></A>Mini-XML License</H1>
|
||||
<P>The Mini-XML library and included programs are provided under the
|
||||
terms of the GNU Library General Public License (LGPL) with the
|
||||
following exceptions:</P>
|
||||
<OL>
|
||||
<LI>Static linking of applications to the Mini-XML library does not
|
||||
constitute a derivative work and does not require the author to provide
|
||||
source code for the application, use the shared Mini-XML libraries, or
|
||||
link their applications against a user-supplied version of Mini-XML.
|
||||
terms of the GNU Library General Public License version 2 (LGPL2) with
|
||||
the following exceptions:</P>
|
||||
<P><B>1.</B> Static linking of applications to the Mini-XML library does
|
||||
not constitute a derivative work and does not require the author to
|
||||
provide source code for the application, use the shared Mini-XML
|
||||
libraries, or link their applications against a user-supplied version
|
||||
of Mini-XML.</P>
|
||||
<P><I>If you link the application to a modified version of Mini-XML,
|
||||
then the changes to Mini-XML must be provided under the terms of the
|
||||
LGPL in sections 1, 2, and 4.</I></P>
|
||||
</LI>
|
||||
<LI>You do not have to provide a copy of the Mini-XML license with
|
||||
programs that are linked to the Mini-XML library, nor do you have to
|
||||
identify the Mini-XML license in your program or documentation as
|
||||
required by section 6 of the LGPL.</LI>
|
||||
</OL>
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
LGPL2 in sections 1, 2, and 4.</I></P>
|
||||
<P><B>2.</B> You do not have to provide a copy of the Mini-XML license
|
||||
with programs that are linked to the Mini-XML library, nor do you have
|
||||
to identify the Mini-XML license in your program or documentation as
|
||||
required by section 6 of the LGPL2.</P>
|
||||
<P> </P>
|
||||
<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.
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -89,7 +89,7 @@ hspace="10" src="4.gif" width="100"></A>Using the mxmldoc Utility</H1>
|
||||
will document all public names it finds in your source files - any
|
||||
names starting with the underscore character (_) or names that are
|
||||
documented with the <A HREF="#ATDIRECTIVES">@private@</A> directive are
|
||||
treated as private and are undocumented.</P>
|
||||
treated as private and are not documented.</P>
|
||||
<P>Comments appearing directly before a function or type definition are
|
||||
used to document that function or type. Comments appearing after
|
||||
argument, definition, return type, or variable declarations are used to
|
||||
@ -144,8 +144,8 @@ hspace="10" src="4.gif" width="100"></A>Using the mxmldoc Utility</H1>
|
||||
included in the documentation</LI>
|
||||
<LI><TT>@since ...@</TT> - flags the item as new since a particular
|
||||
release. The text following the <TT>@since</TT> up to the closing <TT>@</TT>
|
||||
is highlighted in the generated documentation, e.g. <TT>@since CUPS
|
||||
1.3@</TT>.</LI>
|
||||
is highlighted in the generated documentation, e.g. <TT>@since Mini-XML
|
||||
2.7@</TT>.</LI>
|
||||
</UL>
|
||||
|
||||
<!-- NEED 10 -->
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -56,12 +56,45 @@ mxmlEntityGetValue</A></LI>
|
||||
mxmlEntityRemoveCallback</A></LI>
|
||||
<LI><A href="#mxmlFindElement" title="Find the named element.">
|
||||
mxmlFindElement</A></LI>
|
||||
<LI><A href="#mxmlFindPath" title="Find a node with the given path.">
|
||||
mxmlFindPath</A></LI>
|
||||
<LI><A href="#mxmlGetCDATA" title="Get the value for a CDATA node.">
|
||||
mxmlGetCDATA</A></LI>
|
||||
<LI><A href="#mxmlGetCustom" title="Get the value for a custom node.">
|
||||
mxmlGetCustom</A></LI>
|
||||
<LI><A href="#mxmlGetElement" title="Get the name for an element node.">
|
||||
mxmlGetElement</A></LI>
|
||||
<LI><A href="#mxmlGetFirstChild" title="Get the first child of an element node.">
|
||||
mxmlGetFirstChild</A></LI>
|
||||
<LI><A href="#mxmlGetInteger" title="Get the integer value from the specified node or its first child.">
|
||||
mxmlGetInteger</A></LI>
|
||||
<LI><A href="#mxmlGetLastChild" title="Get the last child of an element node.">
|
||||
mxmlGetLastChild</A></LI>
|
||||
<LI><A href="#mxmlGetNextSibling" title="Return the node type...">
|
||||
mxmlGetNextSibling</A></LI>
|
||||
<LI><A href="#mxmlGetOpaque" title="Get an opaque string value for a node or its first child.">
|
||||
mxmlGetOpaque</A></LI>
|
||||
<LI><A href="#mxmlGetParent" title="Get the parent node.">mxmlGetParent</A>
|
||||
</LI>
|
||||
<LI><A href="#mxmlGetPrevSibling" title="Get the previous node for the current parent.">
|
||||
mxmlGetPrevSibling</A></LI>
|
||||
<LI><A href="#mxmlGetReal" title="Get the real value for a node or its first child.">
|
||||
mxmlGetReal</A></LI>
|
||||
<LI><A href="#mxmlGetRefCount" title="Get the current reference (use) count for a node.">
|
||||
mxmlGetRefCount</A></LI>
|
||||
<LI><A href="#mxmlGetText" title="Get the text value for a node or its first child.">
|
||||
mxmlGetText</A></LI>
|
||||
<LI><A href="#mxmlGetType" title="Get the node type.">mxmlGetType</A></LI>
|
||||
<LI><A href="#mxmlGetUserData" title="Get the user data pointer for a node.">
|
||||
mxmlGetUserData</A></LI>
|
||||
<LI><A href="#mxmlIndexDelete" title="Delete an index.">mxmlIndexDelete</A>
|
||||
</LI>
|
||||
<LI><A href="#mxmlIndexEnum" title="Return the next node in the index.">
|
||||
mxmlIndexEnum</A></LI>
|
||||
<LI><A href="#mxmlIndexFind" title="Find the next matching node.">
|
||||
mxmlIndexFind</A></LI>
|
||||
<LI><A href="#mxmlIndexGetCount" title="Get the number of nodes in an index.">
|
||||
mxmlIndexGetCount</A></LI>
|
||||
<LI><A href="#mxmlIndexNew" title="Create a new index.">mxmlIndexNew</A></LI>
|
||||
<LI><A href="#mxmlIndexReset" title="Reset the enumeration/find pointer in the index and return the first node in the index.">
|
||||
mxmlIndexReset</A></LI>
|
||||
@ -99,7 +132,7 @@ mxmlSAXLoadFd</A></LI>
|
||||
mxmlSAXLoadFile</A></LI>
|
||||
<LI><A href="#mxmlSAXLoadString" title="Load a string into an XML node tree using a SAX callback.">
|
||||
mxmlSAXLoadString</A></LI>
|
||||
<LI><A href="#mxmlSaveAllocString" title="Save an XML node tree to an allocated string.">
|
||||
<LI><A href="#mxmlSaveAllocString" title="Save an XML tree to an allocated string.">
|
||||
mxmlSaveAllocString</A></LI>
|
||||
<LI><A href="#mxmlSaveFd" title="Save an XML tree to a file descriptor.">
|
||||
mxmlSaveFd</A></LI>
|
||||
@ -127,7 +160,9 @@ mxmlSetReal</A></LI>
|
||||
mxmlSetText</A></LI>
|
||||
<LI><A href="#mxmlSetTextf" title="Set the value of a text node to a formatted string.">
|
||||
mxmlSetTextf</A></LI>
|
||||
<LI><A href="#mxmlSetWrapMargin" title="Set the the wrap margin when saving XML data.">
|
||||
<LI><A href="#mxmlSetUserData" title="Set the user data pointer for a node.">
|
||||
mxmlSetUserData</A></LI>
|
||||
<LI><A href="#mxmlSetWrapMargin" title="Set the wrap margin when saving XML data.">
|
||||
mxmlSetWrapMargin</A></LI>
|
||||
<LI><A href="#mxmlWalkNext" title="Walk to the next logical node in the tree.">
|
||||
mxmlWalkNext</A></LI>
|
||||
@ -137,18 +172,12 @@ mxmlWalkPrev</A></LI>
|
||||
</LI>
|
||||
<LI><A href="#TYPES">Data Types</A>
|
||||
<UL class="code">
|
||||
<LI><A href="#mxml_attr_t" title="An XML element attribute value.">
|
||||
mxml_attr_t</A></LI>
|
||||
<LI><A href="#mxml_custom_destroy_cb_t" title="Custom data destructor">
|
||||
mxml_custom_destroy_cb_t</A></LI>
|
||||
<LI><A href="#mxml_custom_load_cb_t" title="Custom data load callback function">
|
||||
mxml_custom_load_cb_t</A></LI>
|
||||
<LI><A href="#mxml_custom_save_cb_t" title="Custom data save callback function">
|
||||
mxml_custom_save_cb_t</A></LI>
|
||||
<LI><A href="#mxml_custom_t" title="An XML custom value. ">mxml_custom_t</A>
|
||||
</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">
|
||||
@ -163,27 +192,7 @@ mxml_save_cb_t</A></LI>
|
||||
</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>
|
||||
<LI><A href="#STRUCTURES">Structures</A>
|
||||
<UL class="code">
|
||||
<LI><A href="#mxml_attr_s" title="An XML element attribute value.">
|
||||
mxml_attr_s</A></LI>
|
||||
<LI><A href="#mxml_custom_s" title="An XML custom value. ">mxml_custom_s</A>
|
||||
</LI>
|
||||
<LI><A href="#mxml_element_s" title="An XML element value.">
|
||||
mxml_element_s</A></LI>
|
||||
<LI><A href="#mxml_index_s" title="An XML node index.">mxml_index_s</A></LI>
|
||||
<LI><A href="#mxml_node_s" title="An XML node.">mxml_node_s</A></LI>
|
||||
<LI><A href="#mxml_text_s" title="An XML text value.">mxml_text_s</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A href="#UNIONS">Unions</A>
|
||||
<UL class="code">
|
||||
<LI><A href="#mxml_value_u" title="An XML node value.">mxml_value_u</A></LI>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI><A href="#ENUMERATIONS">Constants</A>
|
||||
@ -410,6 +419,291 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
and MXML_NO_DESCEND to find additional direct descendents of the node.
|
||||
The top node argument constrains the search to a particular node's
|
||||
children.</P>
|
||||
<H3 class="function"><A NAME="8_2_12">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlFindPath">mxmlFindPath</A></A></H3>
|
||||
<P class="description">Find a node with the given path.</P>
|
||||
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A> *mxmlFindPath (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *top,
|
||||
<BR> const char *path
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>top</DT>
|
||||
<DD class="description">Top node</DD>
|
||||
<DT>path</DT>
|
||||
<DD class="description">Path to element</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Found node or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion">The "path" is a slash-separated list of element
|
||||
names. The name "*" is considered a wildcard for one or more levels of
|
||||
elements. For example, "foo/one/two", "bar/two/one", "*/one", and so
|
||||
forth.
|
||||
<BR>
|
||||
<BR> The first child node of the found node is returned if the given
|
||||
node has children and the first child is a value node.</P>
|
||||
<H3 class="function"><A NAME="8_2_13">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetCDATA">mxmlGetCDATA</A></A></H3>
|
||||
<P class="description">Get the value for a CDATA node.</P>
|
||||
<P class="code"> const char *mxmlGetCDATA (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">CDATA value or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node is not a
|
||||
CDATA element.</P>
|
||||
<H3 class="function"><A NAME="8_2_14">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetCustom">mxmlGetCustom</A></A></H3>
|
||||
<P class="description">Get the value for a custom node.</P>
|
||||
<P class="code"> const void *mxmlGetCustom (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Custom value or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node (or its
|
||||
first child) is not a custom value node.</P>
|
||||
<H3 class="function"><A NAME="8_2_15">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetElement">mxmlGetElement</A></A></H3>
|
||||
<P class="description">Get the name for an element node.</P>
|
||||
<P class="code"> const char *mxmlGetElement (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Element name or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node is not
|
||||
an element node.</P>
|
||||
<H3 class="function"><A NAME="8_2_16">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetFirstChild">mxmlGetFirstChild</A></A></H3>
|
||||
<P class="description">Get the first child of an element node.</P>
|
||||
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A>
|
||||
*mxmlGetFirstChild (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">First child or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node is not
|
||||
an element node or if the node has no children.</P>
|
||||
<H3 class="function"><A NAME="8_2_17">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetInteger">mxmlGetInteger</A></A></H3>
|
||||
<P class="description">Get the integer value from the specified node or
|
||||
its first child.</P>
|
||||
<P class="code"> int mxmlGetInteger (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Integer value or 0</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion">0 is returned if the node (or its first child) is
|
||||
not an integer value node.</P>
|
||||
<H3 class="function"><A NAME="8_2_18">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetLastChild">mxmlGetLastChild</A></A></H3>
|
||||
<P class="description">Get the last child of an element node.</P>
|
||||
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A>
|
||||
*mxmlGetLastChild (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Last child or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node is not
|
||||
an element node or if the node has no children.</P>
|
||||
<H3 class="function"><A name="mxmlGetNextSibling">mxmlGetNextSibling</A></H3>
|
||||
<P class="description">Return the node type...</P>
|
||||
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A>
|
||||
*mxmlGetNextSibling (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Get the next node for the current parent.</P>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if this is the last
|
||||
child for the current parent.</P>
|
||||
<H3 class="function"><A NAME="8_2_20">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetOpaque">mxmlGetOpaque</A></A></H3>
|
||||
<P class="description">Get an opaque string value for a node or its
|
||||
first child.</P>
|
||||
<P class="code"> const char *mxmlGetOpaque (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Opaque string or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node (or its
|
||||
first child) is not an opaque value node.</P>
|
||||
<H3 class="function"><A NAME="8_2_21">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetParent">mxmlGetParent</A></A></H3>
|
||||
<P class="description">Get the parent node.</P>
|
||||
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A> *mxmlGetParent (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Parent node or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned for a root node.</P>
|
||||
<H3 class="function"><A NAME="8_2_22">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetPrevSibling">mxmlGetPrevSibling</A></A></H3>
|
||||
<P class="description">Get the previous node for the current parent.</P>
|
||||
<P class="code"> <A href="#mxml_node_t">mxml_node_t</A>
|
||||
*mxmlGetPrevSibling (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Previous node or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if this is the first
|
||||
child for the current parent.</P>
|
||||
<H3 class="function"><A NAME="8_2_23">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetReal">mxmlGetReal</A></A></H3>
|
||||
<P class="description">Get the real value for a node or its first child.</P>
|
||||
<P class="code"> double mxmlGetReal (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Real value or 0.0</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion">0.0 is returned if the node (or its first child)
|
||||
is not a real value node.</P>
|
||||
<H3 class="function"><A NAME="8_2_24">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetRefCount">mxmlGetRefCount</A></A></H3>
|
||||
<P class="description">Get the current reference (use) count for a node.</P>
|
||||
<P class="code"> int mxmlGetRefCount (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Reference count</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion">The initial reference count of new nodes is 1. Use
|
||||
the <A href="#mxmlRetain"><CODE>mxmlRetain</CODE></A> and <A href="#mxmlRelease">
|
||||
<CODE>mxmlRelease</CODE></A> functions to increment and decrement a
|
||||
node's reference count. .</P>
|
||||
<H3 class="function"><A NAME="8_2_25">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetText">mxmlGetText</A></A></H3>
|
||||
<P class="description">Get the text value for a node or its first child.</P>
|
||||
<P class="code"> const char *mxmlGetText (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node,
|
||||
<BR> int *whitespace
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
<DT>whitespace</DT>
|
||||
<DD class="description">1 if string is preceded by whitespace, 0
|
||||
otherwise</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Text string or NULL</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>NULL</CODE> is returned if the node (or its
|
||||
first child) is not a text node. The "whitespace" argument can be NULL.</P>
|
||||
<H3 class="function"><A NAME="8_2_26">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetType">mxmlGetType</A></A></H3>
|
||||
<P class="description">Get the node type.</P>
|
||||
<P class="code"> <A href="#mxml_type_t">mxml_type_t</A> mxmlGetType (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Type of node</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion"><CODE>MXML_IGNORE</CODE> is returned if "node" is <CODE>
|
||||
NULL</CODE>.</P>
|
||||
<H3 class="function"><A NAME="8_2_27">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlGetUserData">mxmlGetUserData</A></A></H3>
|
||||
<P class="description">Get the user data pointer for a node.</P>
|
||||
<P class="code"> void *mxmlGetUserData (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to get</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">User data pointer</P>
|
||||
<H3 class="function"><A name="mxmlIndexDelete">mxmlIndexDelete</A></H3>
|
||||
<P class="description">Delete an index.</P>
|
||||
<P class="code"> void mxmlIndexDelete (
|
||||
@ -458,6 +752,20 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
this function for the first time with a particular set of "element" and
|
||||
"value" strings. Passing NULL for both "element" and "value" is
|
||||
equivalent to calling mxmlIndexEnum().</P>
|
||||
<H3 class="function"><A NAME="8_2_31">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlIndexGetCount">mxmlIndexGetCount</A></A></H3>
|
||||
<P class="description">Get the number of nodes in an index.</P>
|
||||
<P class="code"> int mxmlIndexGetCount (
|
||||
<BR> <A href="#mxml_index_t">mxml_index_t</A> *ind
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>ind</DT>
|
||||
<DD class="description">Index of nodes</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">Number of nodes in index</P>
|
||||
<H3 class="function"><A name="mxmlIndexNew">mxmlIndexNew</A></H3>
|
||||
<P class="description">Create a new index.</P>
|
||||
<P class="code"> <A href="#mxml_index_t">mxml_index_t</A> *mxmlIndexNew
|
||||
@ -588,7 +896,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
<BR> The constants MXML_INTEGER_CALLBACK, MXML_OPAQUE_CALLBACK,
|
||||
MXML_REAL_CALLBACK, and MXML_TEXT_CALLBACK are defined for loading
|
||||
child nodes of the specified type.</P>
|
||||
<H3 class="function"><A NAME="8_2_20">
|
||||
<H3 class="function"><A NAME="8_2_37">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlNewCDATA">mxmlNewCDATA</A></A></H3>
|
||||
<P class="description">Create a new CDATA node.</P>
|
||||
@ -611,7 +919,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
to specify that the new CDATA node has no parent. The data string must
|
||||
be nul-terminated and is copied into the new node. CDATA nodes use the
|
||||
MXML_ELEMENT type.</P>
|
||||
<H3 class="function"><A NAME="8_2_21">
|
||||
<H3 class="function"><A NAME="8_2_38">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.1 <A name="mxmlNewCustom">mxmlNewCustom</A></A></H3>
|
||||
<P class="description">Create a new custom data node.</P>
|
||||
@ -770,7 +1078,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
parameter is used to specify whether leading whitespace is present
|
||||
before the node. The format string must be nul-terminated and is
|
||||
formatted into the new node.</P>
|
||||
<H3 class="function"><A NAME="8_2_28">
|
||||
<H3 class="function"><A NAME="8_2_45">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlNewXML">mxmlNewXML</A></A></H3>
|
||||
<P class="description">Create a new XML document tree.</P>
|
||||
@ -788,7 +1096,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
<P class="discussion">The "version" argument specifies the version
|
||||
number to put in the ?xml element node. If NULL, version 1.0 is
|
||||
assumed.</P>
|
||||
<H3 class="function"><A NAME="8_2_29">
|
||||
<H3 class="function"><A NAME="8_2_46">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlRelease">mxmlRelease</A></A></H3>
|
||||
<P class="description">Release a node.</P>
|
||||
@ -819,7 +1127,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
<P class="discussion">Does not free memory used by the node - use
|
||||
mxmlDelete() for that. This function does nothing if the node has no
|
||||
parent.</P>
|
||||
<H3 class="function"><A NAME="8_2_31">
|
||||
<H3 class="function"><A NAME="8_2_48">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlRetain">mxmlRetain</A></A></H3>
|
||||
<P class="description">Retain a node.</P>
|
||||
@ -833,7 +1141,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">New reference count</P>
|
||||
<H3 class="function"><A NAME="8_2_32">
|
||||
<H3 class="function"><A NAME="8_2_49">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlSAXLoadFd">mxmlSAXLoadFd</A></A></H3>
|
||||
<P class="description">Load a file descriptor into an XML node tree
|
||||
@ -875,7 +1183,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
<BR> The SAX callback must call mxmlRetain() for any nodes that need to
|
||||
be kept for later use. Otherwise, nodes are deleted when the parent
|
||||
node is closed or after each data, comment, CDATA, or directive node.</P>
|
||||
<H3 class="function"><A NAME="8_2_33">
|
||||
<H3 class="function"><A NAME="8_2_50">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlSAXLoadFile">mxmlSAXLoadFile</A></A></H3>
|
||||
<P class="description">Load a file into an XML node tree using a SAX
|
||||
@ -918,7 +1226,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
<BR> The SAX callback must call mxmlRetain() for any nodes that need to
|
||||
be kept for later use. Otherwise, nodes are deleted when the parent
|
||||
node is closed or after each data, comment, CDATA, or directive node.</P>
|
||||
<H3 class="function"><A NAME="8_2_34">
|
||||
<H3 class="function"><A NAME="8_2_51">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlSAXLoadString">mxmlSAXLoadString</A></A></H3>
|
||||
<P class="description">Load a string into an XML node tree using a SAX
|
||||
@ -963,7 +1271,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
node is closed or after each data, comment, CDATA, or directive node.</P>
|
||||
<H3 class="function"><A name="mxmlSaveAllocString">mxmlSaveAllocString</A>
|
||||
</H3>
|
||||
<P class="description">Save an XML node tree to an allocated string.</P>
|
||||
<P class="description">Save an XML tree to an allocated string.</P>
|
||||
<P class="code"> char *mxmlSaveAllocString (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node,
|
||||
<BR> <A href="#mxml_save_cb_t">mxml_save_cb_t</A> cb
|
||||
@ -1068,7 +1376,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
MXML_NO_CALLBACK is specified, whitespace will only be added before
|
||||
MXML_TEXT nodes with leading whitespace and before attribute names
|
||||
inside opening element tags.</P>
|
||||
<H3 class="function"><A NAME="8_2_39">
|
||||
<H3 class="function"><A NAME="8_2_56">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlSetCDATA">mxmlSetCDATA</A></A></H3>
|
||||
<P class="description">Set the element name of a CDATA node.</P>
|
||||
@ -1088,7 +1396,7 @@ mxmlEntityRemoveCallback</A></H3>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion">The node is not changed if it is not a CDATA
|
||||
element node.</P>
|
||||
<H3 class="function"><A NAME="8_2_40">
|
||||
<H3 class="function"><A NAME="8_2_57">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.1 <A name="mxmlSetCustom">mxmlSetCustom</A></A></H3>
|
||||
<P class="description">Set the data and destructor of a custom data
|
||||
@ -1261,10 +1569,27 @@ mxmlSetCustomHandlers</A></H3>
|
||||
<P class="description">0 on success, -1 on failure</P>
|
||||
<H4 class="discussion">Discussion</H4>
|
||||
<P class="discussion">The node is not changed if it is not a text node.</P>
|
||||
<H3 class="function"><A NAME="8_2_49">
|
||||
<H3 class="function"><A NAME="8_2_66">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.7 <A name="mxmlSetUserData">mxmlSetUserData</A></A></H3>
|
||||
<P class="description">Set the user data pointer for a node.</P>
|
||||
<P class="code"> int mxmlSetUserData (
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> *node,
|
||||
<BR> void *data
|
||||
<BR> );</P>
|
||||
<H4 class="parameters">Parameters</H4>
|
||||
<DL>
|
||||
<DT>node</DT>
|
||||
<DD class="description">Node to set</DD>
|
||||
<DT>data</DT>
|
||||
<DD class="description">User data pointer</DD>
|
||||
</DL>
|
||||
<H4 class="returnvalue">Return Value</H4>
|
||||
<P class="description">0 on success, -1 on failure</P>
|
||||
<H3 class="function"><A NAME="8_2_67">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.3 <A name="mxmlSetWrapMargin">mxmlSetWrapMargin</A></A></H3>
|
||||
<P class="description">Set the the wrap margin when saving XML data.</P>
|
||||
<P class="description">Set the wrap margin when saving XML data.</P>
|
||||
<P class="code"> void mxmlSetWrapMargin (
|
||||
<BR> int column
|
||||
<BR> );</P>
|
||||
@ -1322,10 +1647,6 @@ mxmlSetCustomHandlers</A></H3>
|
||||
node's last child is considered to be the previous node. The top node
|
||||
argument constrains the walk to the node's children.</P>
|
||||
<H2 class="title"><A name="TYPES">Data Types</A></H2>
|
||||
<H3 class="typedef"><A name="mxml_attr_t">mxml_attr_t</A></H3>
|
||||
<P class="description">An XML element attribute value.</P>
|
||||
<P class="code"> typedef struct <A href="#mxml_attr_s">mxml_attr_s</A>
|
||||
mxml_attr_t;</P>
|
||||
<H3 class="typedef"><A name="mxml_custom_destroy_cb_t">
|
||||
mxml_custom_destroy_cb_t</A></H3>
|
||||
<P class="description">Custom data destructor</P>
|
||||
@ -1340,16 +1661,6 @@ mxml_custom_save_cb_t</A></H3>
|
||||
<P class="description">Custom data save callback function</P>
|
||||
<P class="code"> typedef char *(*mxml_custom_save_cb_t)(<A href="#mxml_node_t">
|
||||
mxml_node_t</A> *);</P>
|
||||
<H3 class="typedef"><A NAME="8_3_5">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.1 <A name="mxml_custom_t">mxml_custom_t</A></A></H3>
|
||||
<P class="description">An XML custom value.</P>
|
||||
<P class="code"> typedef struct <A href="#mxml_custom_s">mxml_custom_s</A>
|
||||
mxml_custom_t;</P>
|
||||
<H3 class="typedef"><A name="mxml_element_t">mxml_element_t</A></H3>
|
||||
<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>
|
||||
@ -1380,161 +1691,10 @@ mxml_node_t</A> *, mxml_sax_event_t, void *);</P>
|
||||
<P class="description">SAX event type.</P>
|
||||
<P class="code"> typedef enum <A href="#mxml_sax_event_e">
|
||||
mxml_sax_event_e</A> mxml_sax_event_t;</P>
|
||||
<H3 class="typedef"><A name="mxml_text_t">mxml_text_t</A></H3>
|
||||
<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>
|
||||
mxml_value_t;</P>
|
||||
<H2 class="title"><A name="STRUCTURES">Structures</A></H2>
|
||||
<H3 class="struct"><A name="mxml_attr_s">mxml_attr_s</A></H3>
|
||||
<P class="description">An XML element attribute value.</P>
|
||||
<P class="code">struct mxml_attr_s {
|
||||
<BR> char *name;
|
||||
<BR> char *value;
|
||||
<BR> };</P>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>name</DT>
|
||||
<DD class="description">Attribute name</DD>
|
||||
<DT>value</DT>
|
||||
<DD class="description">Attribute value</DD>
|
||||
</DL>
|
||||
<H3 class="struct"><A NAME="8_4_2">
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.1 <A name="mxml_custom_s">mxml_custom_s</A></A></H3>
|
||||
<P class="description">An XML custom value.</P>
|
||||
<P class="code">struct mxml_custom_s {
|
||||
<BR> void *data;
|
||||
<BR> <A href="#mxml_custom_destroy_cb_t">mxml_custom_destroy_cb_t</A>
|
||||
destroy;
|
||||
<BR> };</P>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>data</DT>
|
||||
<DD class="description">Pointer to (allocated) custom data</DD>
|
||||
<DT>destroy</DT>
|
||||
<DD class="description">Pointer to destructor function</DD>
|
||||
</DL>
|
||||
<H3 class="struct"><A name="mxml_element_s">mxml_element_s</A></H3>
|
||||
<P class="description">An XML element value.</P>
|
||||
<P class="code">struct mxml_element_s {
|
||||
<BR> <A href="#mxml_attr_t">mxml_attr_t</A> *attrs;
|
||||
<BR> char *name;
|
||||
<BR> int num_attrs;
|
||||
<BR> };</P>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>attrs</DT>
|
||||
<DD class="description">Attributes</DD>
|
||||
<DT>name</DT>
|
||||
<DD class="description">Name of element</DD>
|
||||
<DT>num_attrs</DT>
|
||||
<DD class="description">Number of attributes</DD>
|
||||
</DL>
|
||||
<H3 class="struct"><A name="mxml_index_s">mxml_index_s</A></H3>
|
||||
<P class="description">An XML node index.</P>
|
||||
<P class="code">struct mxml_index_s {
|
||||
<BR> int alloc_nodes;
|
||||
<BR> char *attr;
|
||||
<BR> int cur_node;
|
||||
<BR> <A href="#mxml_node_t">mxml_node_t</A> **nodes;
|
||||
<BR> int num_nodes;
|
||||
<BR> };</P>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>alloc_nodes</DT>
|
||||
<DD class="description">Allocated nodes in index</DD>
|
||||
<DT>attr</DT>
|
||||
<DD class="description">Attribute used for indexing or NULL</DD>
|
||||
<DT>cur_node</DT>
|
||||
<DD class="description">Current node</DD>
|
||||
<DT>nodes</DT>
|
||||
<DD class="description">Node array</DD>
|
||||
<DT>num_nodes</DT>
|
||||
<DD class="description">Number of nodes in index</DD>
|
||||
</DL>
|
||||
<H3 class="struct"><A name="mxml_node_s">mxml_node_s</A></H3>
|
||||
<P class="description">An XML node.</P>
|
||||
<P class="code">struct mxml_node_s {
|
||||
<BR> struct <A href="#mxml_node_s">mxml_node_s</A> *child;
|
||||
<BR> struct <A href="#mxml_node_s">mxml_node_s</A> *last_child;
|
||||
<BR> struct <A href="#mxml_node_s">mxml_node_s</A> *next;
|
||||
<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> <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>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>child</DT>
|
||||
<DD class="description">First child node</DD>
|
||||
<DT>last_child</DT>
|
||||
<DD class="description">Last child node</DD>
|
||||
<DT>next</DT>
|
||||
<DD class="description">Next node under same parent</DD>
|
||||
<DT>parent</DT>
|
||||
<DD class="description">Parent node</DD>
|
||||
<DT>prev</DT>
|
||||
<DD class="description">Previous node under same parent</DD>
|
||||
<DT>ref_count</DT>
|
||||
<DD class="description">Use count</DD>
|
||||
<DT>type</DT>
|
||||
<DD class="description">Node type</DD>
|
||||
<DT>user_data</DT>
|
||||
<DD class="description">User data</DD>
|
||||
<DT>value</DT>
|
||||
<DD class="description">Node value</DD>
|
||||
</DL>
|
||||
<H3 class="struct"><A name="mxml_text_s">mxml_text_s</A></H3>
|
||||
<P class="description">An XML text value.</P>
|
||||
<P class="code">struct mxml_text_s {
|
||||
<BR> char *string;
|
||||
<BR> int whitespace;
|
||||
<BR> };</P>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>string</DT>
|
||||
<DD class="description">Fragment string</DD>
|
||||
<DT>whitespace</DT>
|
||||
<DD class="description">Leading whitespace?</DD>
|
||||
</DL>
|
||||
<H2 class="title"><A name="UNIONS">Unions</A></H2>
|
||||
<H3 class="union"><A name="mxml_value_u">mxml_value_u</A></H3>
|
||||
<P class="description">An XML node value.</P>
|
||||
<P class="code">union mxml_value_u {
|
||||
<BR> <A href="#mxml_custom_t">mxml_custom_t</A> custom;
|
||||
<BR> <A href="#mxml_element_t">mxml_element_t</A> element;
|
||||
<BR> int integer;
|
||||
<BR> char *opaque;
|
||||
<BR> double real;
|
||||
<BR> <A href="#mxml_text_t">mxml_text_t</A> text;
|
||||
<BR> };</P>
|
||||
<H4 class="members">Members</H4>
|
||||
<DL>
|
||||
<DT>custom
|
||||
<!--span class="info"-->
|
||||
Mini-XML 2.1 </DT>
|
||||
<DD class="description">Custom data</DD>
|
||||
<DT>element</DT>
|
||||
<DD class="description">Element</DD>
|
||||
<DT>integer</DT>
|
||||
<DD class="description">Integer number</DD>
|
||||
<DT>opaque</DT>
|
||||
<DD class="description">Opaque string</DD>
|
||||
<DT>real</DT>
|
||||
<DD class="description">Real number</DD>
|
||||
<DT>text</DT>
|
||||
<DD class="description">Text fragment</DD>
|
||||
</DL>
|
||||
<H2 class="title"><A name="ENUMERATIONS">Constants</A></H2>
|
||||
<H3 class="enumeration"><A name="mxml_sax_event_e">mxml_sax_event_e</A></H3>
|
||||
<P class="description">SAX event type.</P>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -30,7 +30,26 @@ A { text-decoration: none }
|
||||
<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.6</A></H2>
|
||||
<H2><A NAME="7_1">Changes in Mini-XML 2.7</A></H2>
|
||||
<UL>
|
||||
<LI>Added data accessor ("get") functions and made the mxml_node_t and
|
||||
mxml_index_t structures private but still available in the Mini-XML
|
||||
header to preserve source compatibility (STR #118)</LI>
|
||||
<LI>Updated the source headers to reference the Mini-XML license and its
|
||||
exceptions to the LGPL2 (STR #108)</LI>
|
||||
<LI>Added a new mxmlFindPath() function to find the value node of a
|
||||
named element (STR #110)</LI>
|
||||
<LI>Building a static version of the library did not work on Windows
|
||||
(STR #112)</LI>
|
||||
<LI>The shared library did not include a destructor for the thread-
|
||||
specific data key on UNIX-based operating systems (STR #103)</LI>
|
||||
<LI>mxmlLoad* did not error out on XML with multiple root nodes (STR
|
||||
#101)</LI>
|
||||
<LI>Fixed an issue with the _mxml_vstrdupf function (STR #107)</LI>
|
||||
<LI>mxmlSave* no longer write all siblings of the passed node, just that
|
||||
node and its children (STR #109)</LI>
|
||||
</UL>
|
||||
<H2><A NAME="7_2">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
|
||||
@ -49,7 +68,7 @@ hspace="10" src="B.gif" width="100"></A>Release Notes</H1>
|
||||
<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>
|
||||
<H2><A NAME="7_3">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>
|
||||
@ -66,7 +85,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_3">Changes in Mini-XML 2.4</A></H2>
|
||||
<H2><A NAME="7_4">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
|
||||
@ -86,7 +105,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_4">Changes in Mini-XML 2.3</A></H2>
|
||||
<H2><A NAME="7_5">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>
|
||||
@ -124,12 +143,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_5">Changes in Mini-XML 2.2.2</A></H2>
|
||||
<H2><A NAME="7_6">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_6">Changes in Mini-XML 2.2.1</A></H2>
|
||||
<H2><A NAME="7_7">Changes in Mini-XML 2.2.1</A></H2>
|
||||
<UL>
|
||||
<LI>mxmlLoadFd(), mxmlLoadFile(), and mxmlLoadString() now correctly
|
||||
return NULL on error (STR #21)</LI>
|
||||
@ -140,7 +159,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_7">Changes in Mini-XML 2.2</A></H2>
|
||||
<H2><A NAME="7_8">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
|
||||
@ -154,7 +173,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_8">Changes in Mini-XML 2.1</A></H2>
|
||||
<H2><A NAME="7_9">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
|
||||
@ -165,7 +184,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_9">Changes in Mini-XML 2.0</A></H2>
|
||||
<H2><A NAME="7_10">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>
|
||||
@ -198,7 +217,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_10">Changes in Mini-XML 1.3</A></H2>
|
||||
<H2><A NAME="7_11">Changes in Mini-XML 1.3</A></H2>
|
||||
<UL>
|
||||
<LI>Fixes for mxmldoc.</LI>
|
||||
<LI>Added support for reading standard HTML entity names.</LI>
|
||||
@ -214,7 +233,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_11">Changes in Mini-XML 1.2</A></H2>
|
||||
<H2><A NAME="7_12">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()
|
||||
@ -227,13 +246,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_12">Changes in Mini-XML 1.1.2</A></H2>
|
||||
<H2><A NAME="7_13">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_13">Changes in Mini-XML 1.1.1</A></H2>
|
||||
<H2><A NAME="7_14">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
|
||||
@ -244,7 +263,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_14">Changes in Mini-XML 1.1</A></H2>
|
||||
<H2><A NAME="7_15">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.
|
||||
@ -256,7 +275,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_15">Changes in Mini-XML 1.0</A></H2>
|
||||
<H2><A NAME="7_16">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>
|
||||
@ -264,7 +283,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_16">Changes in Mini-XML 0.93</A></H2>
|
||||
<H2><A NAME="7_17">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>
|
||||
@ -289,15 +308,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_17">Changes in Mini-XML 0.92</A></H2>
|
||||
<H2><A NAME="7_18">Changes in Mini-XML 0.92</A></H2>
|
||||
<UL>
|
||||
<LI>mxmlSaveFile() didn't return a value on success.</LI>
|
||||
</UL>
|
||||
<H2><A NAME="7_18">Changes in Mini-XML 0.91</A></H2>
|
||||
<H2><A NAME="7_19">Changes in Mini-XML 0.91</A></H2>
|
||||
<UL>
|
||||
<LI>mxmlWalkNext() would go into an infinite loop.</LI>
|
||||
</UL>
|
||||
<H2><A NAME="7_19">Changes in Mini-XML 0.9</A></H2>
|
||||
<H2><A NAME="7_20">Changes in Mini-XML 0.9</A></H2>
|
||||
<UL>
|
||||
<LI>Initial public release.</LI>
|
||||
</UL>
|
||||
|
@ -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.6</TITLE>
|
||||
<TITLE>Mini-XML Programmers Manual, Version 2.7</TITLE>
|
||||
<META NAME="author" CONTENT="Michael R. Sweet">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2009">
|
||||
<META NAME="copyright" CONTENT="Copyright 2003-2011">
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
||||
<LINK REL="Start" HREF="index.html">
|
||||
<LINK REL="Contents" HREF="index.html">
|
||||
@ -31,7 +31,7 @@ hspace="10" src="D.gif" width="100"></A>XML Schema</H1>
|
||||
<P>This appendix provides the XML schema that is used for the XML files
|
||||
produced by <TT>mxmldoc</TT>. This schema is available on-line at:</P>
|
||||
<PRE>
|
||||
http://www.easysw.com/~mike/mxmldoc.xsd
|
||||
http://www.minixml.org/mxmldoc.xsd
|
||||
</PRE>
|
||||
<H2><A NAME="9_1">mxmldoc.xsd</A></H2>
|
||||
<PRE><SMALL>
|
||||
@ -39,8 +39,8 @@ hspace="10" src="D.gif" width="100"></A>XML Schema</H1>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation xml:lang="en">
|
||||
Mini-XML 2.3 documentation schema for mxmldoc output.
|
||||
Copyright 2003-2007 by Michael Sweet.
|
||||
Mini-XML 2.7 documentation schema for mxmldoc output.
|
||||
Copyright 2003-2011 by Michael Sweet.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
|
@ -164,7 +164,7 @@ else
|
||||
{
|
||||
// Run htmlsearch to search the documentation...
|
||||
$matches = array();
|
||||
$fp = popen("/home/mike/bin/htmlsearch " . escapeshellarg($q), "r");
|
||||
$fp = popen("/usr/local/bin/websearch " . escapeshellarg($q), "r");
|
||||
|
||||
while ($line = fgets($fp, 1024))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user