mxml/www/docfiles/mxmlSaveString.html
Michael R Sweet c075136310 Update documentation with release notes.
Use new logo.

Add favicon stuff.

Prep for 2.2.1 release.
2005-05-17 00:54:44 +00:00

71 lines
2.4 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.2.1</TITLE>
<META NAME="author" CONTENT="Michael Sweet">
<META NAME="copyright" CONTENT="Copyright 2003-2005">
<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="mxmlSaveFile.html">
<LINK REL="Next" HREF="mxmlSetCustom.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="mxmlSaveFile.html">Previous</A>
<A HREF="mxmlSetCustom.html">Next</A>
<HR NOSHADE>
<H3><A name="mxmlSaveString">mxmlSaveString()</A></H3>
<HR noshade/>
<H4>Description</H4>
<P>Save an XML node tree to a string. This function returns the total
number of bytes that would be required for the string but only copies
(bufsize - 1) characters into the specified buffer. The callback
argument specifies a function that returns a whitespace string or NULL
before and after each element. If MXML_NO_CALLBACK is specified,
whitespace will only be added before MXML_TEXT nodes with leading
whitespace and before attribute names inside opening element tags.</P>
<H4>Syntax</H4>
<PRE>
int
mxmlSaveString(
<A href="mxmlnodet.html#mxml_node_t">mxml_node_t</A> * node,
char * buffer,
int bufsize,
const char * (*cb)(mxml_node_t *node, int ws));
</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>node</TT></TD><TD>Node to write</TD></TR>
<TR><TD><TT>buffer</TT></TD><TD>String buffer</TD></TR>
<TR><TD><TT>bufsize</TT></TD><TD>Size of string buffer</TD></TR>
<TR><TD><TT>(*cb)(mxml_node_t *node, int ws)</TT></TD><TD>Whitespace
callback or MXML_NO_CALLBACK</TD></TR>
</TABLE>
<H4>Returns</H4>
<P>Size of string</P>
<!-- NEW PAGE -->
<HR NOSHADE>
<A HREF="toc.html">Contents</A>
<A HREF="mxmlSaveFile.html">Previous</A>
<A HREF="mxmlSetCustom.html">Next</A>
</BODY>
</HTML>