mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-17 08:25:31 +00:00
6a062afd64
Tweek look-n-feel. Fix comment editing. Use format_text() for comments, too.
71 lines
2.5 KiB
HTML
71 lines
2.5 KiB
HTML
<!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.0</TITLE>
|
|
<META NAME="author" CONTENT="Michael Sweet">
|
|
<META NAME="copyright" CONTENT="Copyright 2003-2004">
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
|
<LINK REL="Start" HREF="index.html">
|
|
<LINK REL="Contents" HREF="toc.html">
|
|
<LINK REL="Prev" HREF="mxmlLoadFile.html">
|
|
<LINK REL="Next" HREF="mxmlNewElement.html">
|
|
<STYLE TYPE="text/css"><!--
|
|
BODY { font-family: 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 }
|
|
--></STYLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="toc.html">Contents</A>
|
|
<A HREF="mxmlLoadFile.html">Previous</A>
|
|
<A HREF="mxmlNewElement.html">Next</A>
|
|
<HR NOSHADE>
|
|
<H3><A name="mxmlLoadString">mxmlLoadString()</A></H3>
|
|
<HR noshade/>
|
|
<H4>Description</H4>
|
|
<P>Load a string into an XML node tree. 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
|
|
<?xml> 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. 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>
|
|
<H4>Syntax</H4>
|
|
<PRE>
|
|
<A href="mxmlnodet.html#mxml_node_t">mxml_node_t</A> *
|
|
mxmlLoadString(
|
|
<A href="mxmlnodet.html#mxml_node_t">mxml_node_t</A> * top,
|
|
const char * s,
|
|
<A href="mxmltypet.html#mxml_type_t">mxml_type_t</A> (*cb)(mxml_node_t *node));
|
|
</PRE>
|
|
<H4>Arguments</H4>
|
|
<P class="table"></P>
|
|
<TABLE align="center" border="1" cellpadding="5" cellspacing="0" width="80%">
|
|
<THEAD></THEAD>
|
|
<TR bgcolor="#cccccc"><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)(mxml_node_t *node)</TT></TD><TD>Callback function or
|
|
MXML_NO_CALLBACK</TD></TR>
|
|
</TABLE>
|
|
<H4>Returns</H4>
|
|
<P>First node or NULL if the string has errors.</P>
|
|
|
|
<!-- NEW PAGE -->
|
|
<HR NOSHADE>
|
|
<A HREF="toc.html">Contents</A>
|
|
<A HREF="mxmlLoadFile.html">Previous</A>
|
|
<A HREF="mxmlNewElement.html">Next</A>
|
|
</BODY>
|
|
</HTML>
|