mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 23:35:30 +00:00
54 lines
2.1 KiB
HTML
54 lines
2.1 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="SaveCallbacks.html">
|
|
<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>
|
|
<A HREF="SaveCallbacks.html">Previous</A>
|
|
<A HREF="FormattedText.html">Next</A>
|
|
<HR NOSHADE>
|
|
<H2><A NAME="4_3">Changing Node Values</A></H2>
|
|
<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>
|
|
<HR NOSHADE>
|
|
<A HREF="toc.html">Contents</A>
|
|
<A HREF="SaveCallbacks.html">Previous</A>
|
|
<A HREF="FormattedText.html">Next</A>
|
|
</BODY>
|
|
</HTML>
|