You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
mxml/www/docfiles/MiniXML23mxmlSAXLoadString....

76 lines
3.1 KiB

<!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.3</TITLE>
<META NAME="author" CONTENT="Michael R. Sweet">
<META NAME="copyright" CONTENT="Copyright 2003-2007">
<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">
<LINK REL="Prev" HREF="MiniXML23mxmlSAXLoadFile.html">
<LINK REL="Next" HREF="mxmlSaveAllocString.html">
<STYLE TYPE="text/css"><!--
BODY { font-family: sans-serif }
H1 { font-family: sans-serif }
H2 { font-family: sans-serif }
H3 { font-family: sans-serif }
H4 { font-family: sans-serif }
H5 { font-family: sans-serif }
H6 { font-family: sans-serif }
SUB { font-size: smaller }
SUP { font-size: smaller }
PRE { font-family: monospace }
A { text-decoration: none }
--></STYLE>
</HEAD>
<BODY>
<A HREF="index.html">Contents</A>
<A HREF="MiniXML23mxmlSAXLoadFile.html">Previous</A>
<A HREF="mxmlSaveAllocString.html">Next</A>
<HR NOSHADE>
<H3 class="title"><A NAME="8_3_33">
<!--span class='info'-->
&nbsp;Mini-XML 2.3&nbsp;<A name="mxmlSAXLoadString">mxmlSAXLoadString()</A></A></H3>
<H4>Description</H4>
<P>Load a string into an XML node tree using a SAX callback.</P>
<P>The nodes in the specified string are added to the specified top
node. If no top node is provided, the XML string MUST be well-formed
with a single parent node like &lt;?xml&gt; for the entire string. The
callback function returns the value type that should be used for child
nodes. If MXML_NO_CALLBACK is specified then all child nodes will be
either MXML_ELEMENT or MXML_TEXT nodes.</P>
<P>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>
<P>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>
<H4>Syntax</H4>
<P> <TT><A href="mxmlnodet.html#mxml_node_t">mxml_node_t</A> *
<BR> mxmlSAXLoadString( <A href="mxmlnodet.html#mxml_node_t">mxml_node_t</A>
* top, const char * s, <A href="mxmlloadcbt.html#mxml_load_cb_t">
mxml_load_cb_t</A> cb, <A href="mxmlsaxcbt.html#mxml_sax_cb_t">
mxml_sax_cb_t</A> sax_cb, void * sax_data);</TT></P>
<H4>Arguments</H4>
<DIV class="table">
<TABLE align="center" border="1" cellpadding="5" cellspacing="0" summary="Arguments"
width="80%"><THEAD></THEAD>
<TR><TH>Name</TH><TH>Description</TH></TR>
<TBODY></TBODY>
<TR><TD><TT>top</TT></TD><TD>Top node</TD></TR>
<TR><TD><TT>s</TT></TD><TD>String to load</TD></TR>
<TR><TD><TT>cb</TT></TD><TD>Callback function or MXML_NO_CALLBACK</TD></TR>
<TR><TD><TT>sax_cb</TT></TD><TD>SAX callback or MXML_NO_CALLBACK</TD></TR>
<TR><TD><TT>sax_data</TT></TD><TD>SAX user data</TD></TR>
</TABLE>
</DIV>
<H4>Returns</H4>
<P>First node or NULL if the string has errors.</P>
<!-- NEW PAGE -->
<HR NOSHADE>
<A HREF="index.html">Contents</A>
<A HREF="MiniXML23mxmlSAXLoadFile.html">Previous</A>
<A HREF="mxmlSaveAllocString.html">Next</A>
</BODY>
</HTML>