|
|
|
@ -262,7 +262,7 @@ h3.title { |
|
|
|
|
<div class="body"> |
|
|
|
|
<h2 class="title"><a id="FUNCTIONS">Functions</a></h2> |
|
|
|
|
<h3 class="function"><a id="mxmlAdd">mxmlAdd</a></h3> |
|
|
|
|
<p class="description">Add a node to a tree.</p> |
|
|
|
|
<p class="description"></p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlAdd (<br> |
|
|
|
|
    <a href="#mxml_node_t">mxml_node_t</a> *parent,<br> |
|
|
|
@ -281,7 +281,8 @@ void mxmlAdd (<br> |
|
|
|
|
<dt>node</dt> |
|
|
|
|
<dd class="description">Node to add</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Add a node to a tree.</p> |
|
|
|
|
<p class="discussion">Adds the specified node to the parent. If the child argument is not |
|
|
|
|
<code>NULL</code>, puts the new node before or after the specified child depending |
|
|
|
|
on the value of the where argument. If the child argument is <code>NULL</code>, |
|
|
|
@ -289,7 +290,7 @@ puts the new node at the beginning of the child list (<code>MXML_ADD_BEFORE</cod |
|
|
|
|
or at the end of the child list (<code>MXML_ADD_AFTER</code>). The constant |
|
|
|
|
<code>MXML_ADD_TO_PARENT</code> can be used to specify a <code>NULL</code> child pointer.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlDelete">mxmlDelete</a></h3> |
|
|
|
|
<p class="description">Delete a node and all of its children.</p> |
|
|
|
|
<p class="description">Insert node after this child...</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlDelete (<br> |
|
|
|
|
    <a href="#mxml_node_t">mxml_node_t</a> *node<br> |
|
|
|
@ -299,11 +300,12 @@ void mxmlDelete (<br> |
|
|
|
|
<dt>node</dt> |
|
|
|
|
<dd class="description">Node to delete</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Delete a node and all of its children.</p> |
|
|
|
|
<p class="discussion">If the specified node has a parent, this function first removes the |
|
|
|
|
node from its parent using the <a href="#mxmlRemove"><code>mxmlRemove</code></a> function.</p> |
|
|
|
|
<h3 class="function"><span class="info"> Mini-XML 2.4 </span><a id="mxmlElementDeleteAttr">mxmlElementDeleteAttr</a></h3> |
|
|
|
|
<p class="description">Delete an attribute.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlElementDeleteAttr">mxmlElementDeleteAttr</a></h3> |
|
|
|
|
<p class="description"></p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlElementDeleteAttr (<br> |
|
|
|
|
    <a href="#mxml_node_t">mxml_node_t</a> *node,<br> |
|
|
|
@ -316,6 +318,9 @@ void mxmlElementDeleteAttr (<br> |
|
|
|
|
<dt>name</dt> |
|
|
|
|
<dd class="description">Attribute name</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Delete an attribute.</p> |
|
|
|
|
<p class="discussion"></p> |
|
|
|
|
<h3 class="function"><a id="mxmlElementGetAttr">mxmlElementGetAttr</a></h3> |
|
|
|
|
<p class="description">Get an attribute.</p> |
|
|
|
|
<p class="code"> |
|
|
|
@ -373,7 +378,7 @@ int mxmlElementGetAttrCount (<br> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Number of attributes</p> |
|
|
|
|
<h3 class="function"><a id="mxmlElementSetAttr">mxmlElementSetAttr</a></h3> |
|
|
|
|
<p class="description">Set an attribute.</p> |
|
|
|
|
<p class="description">Node</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlElementSetAttr (<br> |
|
|
|
|
    <a href="#mxml_node_t">mxml_node_t</a> *node,<br> |
|
|
|
@ -389,13 +394,14 @@ void mxmlElementSetAttr (<br> |
|
|
|
|
<dt>value</dt> |
|
|
|
|
<dd class="description">Attribute value</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Set an attribute.</p> |
|
|
|
|
<p class="discussion">If the named attribute already exists, the value of the attribute |
|
|
|
|
is replaced by the new string value. The string value is copied |
|
|
|
|
into the element node. This function does nothing if the node is |
|
|
|
|
not an element.</p> |
|
|
|
|
<h3 class="function"><span class="info"> Mini-XML 2.3 </span><a id="mxmlElementSetAttrf">mxmlElementSetAttrf</a></h3> |
|
|
|
|
<p class="description">Set an attribute with a formatted value.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlElementSetAttrf">mxmlElementSetAttrf</a></h3> |
|
|
|
|
<p class="description">Range check input...</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlElementSetAttrf (<br> |
|
|
|
|
    <a href="#mxml_node_t">mxml_node_t</a> *node,<br> |
|
|
|
@ -414,7 +420,8 @@ void mxmlElementSetAttrf (<br> |
|
|
|
|
<dt>...</dt> |
|
|
|
|
<dd class="description">Additional arguments as needed</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Set an attribute with a formatted value.</p> |
|
|
|
|
<p class="discussion">If the named attribute already exists, the value of the attribute |
|
|
|
|
is replaced by the new formatted string. The formatted string value is |
|
|
|
|
copied into the element node. This function does nothing if the node |
|
|
|
@ -466,7 +473,7 @@ int mxmlEntityGetValue (<br> |
|
|
|
|
<p class="discussion">The entity name can also be a numeric constant. -1 is returned if the |
|
|
|
|
name is not known.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlEntityRemoveCallback">mxmlEntityRemoveCallback</a></h3> |
|
|
|
|
<p class="description">Remove a callback.</p> |
|
|
|
|
<p class="description">Global data</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlEntityRemoveCallback (<br> |
|
|
|
|
    <a href="#mxml_entity_cb_t">mxml_entity_cb_t</a> cb<br> |
|
|
|
@ -476,6 +483,8 @@ void mxmlEntityRemoveCallback (<br> |
|
|
|
|
<dt>cb</dt> |
|
|
|
|
<dd class="description">Callback function to remove</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Remove a callback.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlFindElement">mxmlFindElement</a></h3> |
|
|
|
|
<p class="description">Find the named element.</p> |
|
|
|
|
<p class="code"> |
|
|
|
@ -800,7 +809,7 @@ void *mxmlGetUserData (<br> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">User data pointer</p> |
|
|
|
|
<h3 class="function"><a id="mxmlIndexDelete">mxmlIndexDelete</a></h3> |
|
|
|
|
<p class="description">Delete an index.</p> |
|
|
|
|
<p class="description"></p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlIndexDelete (<br> |
|
|
|
|
    <a href="#mxml_index_t">mxml_index_t</a> *ind<br> |
|
|
|
@ -810,6 +819,8 @@ void mxmlIndexDelete (<br> |
|
|
|
|
<dt>ind</dt> |
|
|
|
|
<dd class="description">Index to delete</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Delete an index.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlIndexEnum">mxmlIndexEnum</a></h3> |
|
|
|
|
<p class="description">Return the next node in the index.</p> |
|
|
|
|
<p class="code"> |
|
|
|
@ -1232,7 +1243,7 @@ is deleted via <a href="#mxmlDelete"><code>mxmlDelete</code></a>. |
|
|
|
|
|
|
|
|
|
</p> |
|
|
|
|
<h3 class="function"><a id="mxmlRemove">mxmlRemove</a></h3> |
|
|
|
|
<p class="description">Remove a node from its parent.</p> |
|
|
|
|
<p class="description">Create the node and set the text value...</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlRemove (<br> |
|
|
|
|
    <a href="#mxml_node_t">mxml_node_t</a> *node<br> |
|
|
|
@ -1242,7 +1253,8 @@ void mxmlRemove (<br> |
|
|
|
|
<dt>node</dt> |
|
|
|
|
<dd class="description">Node to remove</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Remove a node from its parent.</p> |
|
|
|
|
<p class="discussion">This function does not free memory used by the node - use <a href="#mxmlDelete"><code>mxmlDelete</code></a> |
|
|
|
|
for that. This function does nothing if the node has no parent.</p> |
|
|
|
|
<h3 class="function"><span class="info"> Mini-XML 2.3 </span><a id="mxmlRetain">mxmlRetain</a></h3> |
|
|
|
@ -1532,7 +1544,7 @@ int mxmlSetCustom (<br> |
|
|
|
|
|
|
|
|
|
</p> |
|
|
|
|
<h3 class="function"><a id="mxmlSetCustomHandlers">mxmlSetCustomHandlers</a></h3> |
|
|
|
|
<p class="description">Set the handling functions for custom data.</p> |
|
|
|
|
<p class="description">Read the XML data...</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlSetCustomHandlers (<br> |
|
|
|
|
    <a href="#mxml_custom_load_cb_t">mxml_custom_load_cb_t</a> load,<br> |
|
|
|
@ -1545,7 +1557,8 @@ void mxmlSetCustomHandlers (<br> |
|
|
|
|
<dt>save</dt> |
|
|
|
|
<dd class="description">Save function</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Set the handling functions for custom data.</p> |
|
|
|
|
<p class="discussion">The load function accepts a node pointer and a data string and must |
|
|
|
|
return 0 on success and non-zero on error.<br> |
|
|
|
|
<br> |
|
|
|
@ -1570,7 +1583,7 @@ int mxmlSetElement (<br> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<p class="discussion">The node is not changed if it is not an element node.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlSetErrorCallback">mxmlSetErrorCallback</a></h3> |
|
|
|
|
<p class="description">Set the error message callback.</p> |
|
|
|
|
<p class="description">Global data</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlSetErrorCallback (<br> |
|
|
|
|
    <a href="#mxml_error_cb_t">mxml_error_cb_t</a> cb<br> |
|
|
|
@ -1580,6 +1593,8 @@ void mxmlSetErrorCallback (<br> |
|
|
|
|
<dt>cb</dt> |
|
|
|
|
<dd class="description">Error callback function</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Set the error message callback.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlSetInteger">mxmlSetInteger</a></h3> |
|
|
|
|
<p class="description">Set the value of an integer node.</p> |
|
|
|
|
<p class="code"> |
|
|
|
@ -1718,8 +1733,8 @@ int mxmlSetUserData (<br> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">0 on success, -1 on failure</p> |
|
|
|
|
<h3 class="function"><span class="info"> Mini-XML 2.3 </span><a id="mxmlSetWrapMargin">mxmlSetWrapMargin</a></h3> |
|
|
|
|
<p class="description">Set the wrap margin when saving XML data.</p> |
|
|
|
|
<h3 class="function"><a id="mxmlSetWrapMargin">mxmlSetWrapMargin</a></h3> |
|
|
|
|
<p class="description">Global data</p> |
|
|
|
|
<p class="code"> |
|
|
|
|
void mxmlSetWrapMargin (<br> |
|
|
|
|
    int column<br> |
|
|
|
@ -1729,7 +1744,8 @@ void mxmlSetWrapMargin (<br> |
|
|
|
|
<dt>column</dt> |
|
|
|
|
<dd class="description">Column for wrapping, 0 to disable wrapping</dd> |
|
|
|
|
</dl> |
|
|
|
|
<h4 class="discussion">Discussion</h4> |
|
|
|
|
<h4 class="returnvalue">Return Value</h4> |
|
|
|
|
<p class="description">Set the wrap margin when saving XML data.</p> |
|
|
|
|
<p class="discussion">Wrapping is disabled when "column" is 0. |
|
|
|
|
|
|
|
|
|
</p> |
|
|
|
|