2004-05-19 16:34:55 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
2004-11-13 18:26:38 +00:00
|
|
|
<TITLE>Mini-XML Programmers Manual, Version 2.1</TITLE>
|
2004-05-19 16:34:55 +00:00
|
|
|
<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">
|
2004-11-13 18:26:38 +00:00
|
|
|
<LINK REL="Prev" HREF="CustomDataTypes.html">
|
2004-05-19 16:34:55 +00:00
|
|
|
<LINK REL="Next" HREF="FormattedText.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>
|
2004-11-13 18:26:38 +00:00
|
|
|
<A HREF="CustomDataTypes.html">Previous</A>
|
2004-05-19 16:34:55 +00:00
|
|
|
<A HREF="FormattedText.html">Next</A>
|
|
|
|
<HR NOSHADE>
|
2004-11-13 18:26:38 +00:00
|
|
|
<H2><A NAME="4_4">Changing Node Values</A></H2>
|
2004-06-21 11:00:28 +00:00
|
|
|
<P>All of the examples so far have concentrated on creating and loading
|
|
|
|
new XML data nodes. Many applications, however, need to manipulate or
|
|
|
|
change the nodes during their operation, so Mini-XML provides functions
|
|
|
|
to change node values safely and without leaking memory.</P>
|
|
|
|
<P>Existing nodes can be changed using the <A href="mxmlSetElement.html#mxmlSetElement">
|
|
|
|
<TT>mxmlSetElement()</TT></A>, <A href="mxmlSetInteger.html#mxmlSetInteger">
|
|
|
|
<TT>mxmlSetInteger()</TT></A>, <A href="mxmlSetOpaque.html#mxmlSetOpaque">
|
|
|
|
<TT>mxmlSetOpaque()</TT></A>, <A href="mxmlSetReal.html#mxmlSetReal"><TT>
|
|
|
|
mxmlSetReal()</TT></A>, and <A href="mxmlSetText.html#mxmlSetText"><TT>
|
|
|
|
mxmlSetText()</TT></A> functions. For example, use the following
|
|
|
|
function call to change a text node to contain the text "new" with
|
|
|
|
leading whitespace:</P>
|
|
|
|
<PRE>
|
|
|
|
<A href="mxmlnodet.html#mxml_node_t">mxml_node_t</A> *node;
|
|
|
|
|
|
|
|
<A href="mxmlSetText.html#mxmlSetText">mxmlSetText</A>(node, 1, "new");
|
|
|
|
</PRE>
|
2004-05-19 16:34:55 +00:00
|
|
|
<HR NOSHADE>
|
|
|
|
<A HREF="toc.html">Contents</A>
|
2004-11-13 18:26:38 +00:00
|
|
|
<A HREF="CustomDataTypes.html">Previous</A>
|
2004-05-19 16:34:55 +00:00
|
|
|
<A HREF="FormattedText.html">Next</A>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|