libxml-HTMLtree.html revision c6e07559fa002911c7a14b696c4f69d481b54802
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>HTMLtree</title><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><meta xmlns="http://www.w3.org/TR/xhtml1/transitional" name="generator" content="GTK-Doc V1.0 (XML mode)"></meta><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
2        .synopsis, .classsynopsis {
3            background: #eeeeee;
4            border: solid 1px #aaaaaa;
5            padding: 0.5em;
6        }
7        .programlisting {
8            background: #eeeeff;
9            border: solid 1px #aaaaff;
10            padding: 0.5em;
11        }
12        .variablelist {
13            padding: 4px;
14            margin-left: 3em;
15        }
16        .navigation {
17            background: #ffeeee;
18            border: solid 1px #ffaaaa;
19            margin-top: 0.5em;
20            margin-bottom: 0.5em;
21        }
22        .navigation a {
23            color: #770000;
24        }
25        .navigation a:visited {
26            color: #550000;
27        }
28        .navigation .title {
29            font-size: 200%;
30        }
31      </style><link rel="home" href="index.html" title="[Insert name here] Reference Manual"><link rel="up" href="ch01.html" title="[Insert title here]"><link rel="previous" href="libxml-list.html" title="list"><link rel="next" href="libxml-parserInternals.html" title="parserInternals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libxml-list.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td><th width="100%" align="center">[Insert name here] Reference Manual</th><td><a accesskey="n" href="libxml-parserInternals.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td></tr></table><div class="refentry" lang="en"><a name="libxml-HTMLtree"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">HTMLtree</span></h2><p>HTMLtree &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
32
33
34
35#define     <a href="libxml-HTMLtree.html#HTML-TEXT-NODE-CAPS">HTML_TEXT_NODE</a>
36#define     <a href="libxml-HTMLtree.html#HTML-ENTITY-REF-NODE-CAPS">HTML_ENTITY_REF_NODE</a>
37#define     <a href="libxml-HTMLtree.html#HTML-COMMENT-NODE-CAPS">HTML_COMMENT_NODE</a>
38#define     <a href="libxml-HTMLtree.html#HTML-PRESERVE-NODE-CAPS">HTML_PRESERVE_NODE</a>
39#define     <a href="libxml-HTMLtree.html#HTML-PI-NODE-CAPS">HTML_PI_NODE</a>
40<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>  <a href="libxml-HTMLtree.html#htmlNewDoc">htmlNewDoc</a>                      (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URI,
41                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID);
42<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>  <a href="libxml-HTMLtree.html#htmlNewDocNoDtD">htmlNewDocNoDtD</a>                 (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URI,
43                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID);
44const <a href="libxml-tree.html#xmlChar">xmlChar</a>* <a href="libxml-HTMLtree.html#htmlGetMetaEncoding">htmlGetMetaEncoding</a>          (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc);
45int         <a href="libxml-HTMLtree.html#htmlSetMetaEncoding">htmlSetMetaEncoding</a>             (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc,
46                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *encoding);
47void        <a href="libxml-HTMLtree.html#htmlDocDumpMemory">htmlDocDumpMemory</a>               (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
48                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> **mem,
49                                             int *size);
50int         <a href="libxml-HTMLtree.html#htmlDocDump">htmlDocDump</a>                     (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *f,
51                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
52int         <a href="libxml-HTMLtree.html#htmlSaveFile">htmlSaveFile</a>                    (const char *filename,
53                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
54int         <a href="libxml-HTMLtree.html#htmlNodeDump">htmlNodeDump</a>                    (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf,
55                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
56                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
57void        <a href="libxml-HTMLtree.html#htmlNodeDumpFile">htmlNodeDumpFile</a>                (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *out,
58                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
59                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
60int         <a href="libxml-HTMLtree.html#htmlNodeDumpFileFormat">htmlNodeDumpFileFormat</a>          (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *out,
61                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
62                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur,
63                                             const char *encoding,
64                                             int format);
65int         <a href="libxml-HTMLtree.html#htmlSaveFileEnc">htmlSaveFileEnc</a>                 (const char *filename,
66                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
67                                             const char *encoding);
68int         <a href="libxml-HTMLtree.html#htmlSaveFileFormat">htmlSaveFileFormat</a>              (const char *filename,
69                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
70                                             const char *encoding,
71                                             int format);
72void        <a href="libxml-HTMLtree.html#htmlNodeDumpFormatOutput">htmlNodeDumpFormatOutput</a>        (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
73                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
74                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur,
75                                             const char *encoding,
76                                             int format);
77void        <a href="libxml-HTMLtree.html#htmlDocContentDumpOutput">htmlDocContentDumpOutput</a>        (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
78                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
79                                             const char *encoding);
80void        <a href="libxml-HTMLtree.html#htmlDocContentDumpFormatOutput">htmlDocContentDumpFormatOutput</a>  (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
81                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
82                                             const char *encoding,
83                                             int format);
84int         <a href="libxml-HTMLtree.html#htmlIsBooleanAttr">htmlIsBooleanAttr</a>               (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);
85void        <a href="libxml-HTMLtree.html#htmlNodeDumpOutput">htmlNodeDumpOutput</a>              (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
86                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
87                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur,
88                                             const char *encoding);
89</pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
90
91</p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="HTML-TEXT-NODE-CAPS"></a>HTML_TEXT_NODE</h3><pre class="programlisting">#define HTML_TEXT_NODE		XML_TEXT_NODE
92</pre><p>
93Macro. A text node in a HTML document is really implemented
94the same way as a text node in an XML document.</p><p>
95
96</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="HTML-ENTITY-REF-NODE-CAPS"></a>HTML_ENTITY_REF_NODE</h3><pre class="programlisting">#define HTML_ENTITY_REF_NODE	XML_ENTITY_REF_NODE
97</pre><p>
98Macro. An entity reference in a HTML document is really implemented
99the same way as an entity reference in an XML document.</p><p>
100
101</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="HTML-COMMENT-NODE-CAPS"></a>HTML_COMMENT_NODE</h3><pre class="programlisting">#define HTML_COMMENT_NODE	XML_COMMENT_NODE
102</pre><p>
103Macro. A comment in a HTML document is really implemented
104the same way as a comment in an XML document.</p><p>
105
106</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="HTML-PRESERVE-NODE-CAPS"></a>HTML_PRESERVE_NODE</h3><pre class="programlisting">#define HTML_PRESERVE_NODE	XML_CDATA_SECTION_NODE
107</pre><p>
108Macro. A preserved node in a HTML document is really implemented
109the same way as a CDATA section in an XML document.</p><p>
110
111</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="HTML-PI-NODE-CAPS"></a>HTML_PI_NODE</h3><pre class="programlisting">#define HTML_PI_NODE		XML_PI_NODE
112</pre><p>
113Macro. A processing instruction in a HTML document is really implemented
114the same way as a processing instruction in an XML document.</p><p>
115
116</p></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNewDoc"></a>htmlNewDoc ()</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>  htmlNewDoc                      (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URI,
117                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID);</pre><p>
118Creates a new HTML document</p><p>
119
120</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>URI</tt></i>�:</span></td><td>  URI for the dtd, or NULL
121</td></tr><tr><td><span class="term"><i class="parameter"><tt>ExternalID</tt></i>�:</span></td><td>  the external ID of the DTD, or NULL
122</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new document
123</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNewDocNoDtD"></a>htmlNewDocNoDtD ()</h3><pre class="programlisting"><a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a>  htmlNewDocNoDtD                 (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *URI,
124                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *ExternalID);</pre><p>
125Creates a new HTML document without a DTD node if <i class="parameter"><tt>URI</tt></i> and <i class="parameter"><tt>ExternalID</tt></i>
126are NULL</p><p>
127
128</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>URI</tt></i>�:</span></td><td>  URI for the dtd, or NULL
129</td></tr><tr><td><span class="term"><i class="parameter"><tt>ExternalID</tt></i>�:</span></td><td>  the external ID of the DTD, or NULL
130</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new document, do not initialize the DTD if not provided
131</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlGetMetaEncoding"></a>htmlGetMetaEncoding ()</h3><pre class="programlisting">const <a href="libxml-tree.html#xmlChar">xmlChar</a>* htmlGetMetaEncoding          (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc);</pre><p>
132Encoding definition lookup in the Meta tags</p><p>
133
134</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
135</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the current encoding as flagged in the HTML source
136</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlSetMetaEncoding"></a>htmlSetMetaEncoding ()</h3><pre class="programlisting">int         htmlSetMetaEncoding             (<a href="libxml-HTMLparser.html#htmlDocPtr">htmlDocPtr</a> doc,
137                                             const <a href="libxml-tree.html#xmlChar">xmlChar</a> *encoding);</pre><p>
138Sets the current encoding in the Meta tags
139NOTE: this will not change the document content encoding, just
140the META flag associated.</p><p>
141
142</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
143</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td>  the encoding string
144</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>0 in case of success and -1 in case of error
145</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlDocDumpMemory"></a>htmlDocDumpMemory ()</h3><pre class="programlisting">void        htmlDocDumpMemory               (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
146                                             <a href="libxml-tree.html#xmlChar">xmlChar</a> **mem,
147                                             int *size);</pre><p>
148Dump an HTML document in memory and return the xmlChar * and it's size.
149It's up to the caller to free the memory.</p><p>
150
151</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
152</td></tr><tr><td><span class="term"><i class="parameter"><tt>mem</tt></i>�:</span></td><td>  OUT: the memory pointer
153</td></tr><tr><td><span class="term"><i class="parameter"><tt>size</tt></i>�:</span></td><td>  OUT: the memory length
154</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlDocDump"></a>htmlDocDump ()</h3><pre class="programlisting">int         htmlDocDump                     (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *f,
155                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur);</pre><p>
156Dump an HTML document to an open FILE.</p><p>
157
158</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>f</tt></i>�:</span></td><td>  the FILE*
159</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
160</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the number of byte written or -1 in case of failure.
161</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlSaveFile"></a>htmlSaveFile ()</h3><pre class="programlisting">int         htmlSaveFile                    (const char *filename,
162                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur);</pre><p>
163Dump an HTML document to a file. If <i class="parameter"><tt>filename</tt></i> is "-" the stdout file is
164used.</p><p>
165
166</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>filename</tt></i>�:</span></td><td>  the filename (or URL)
167</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
168</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the number of byte written or -1 in case of failure.
169</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNodeDump"></a>htmlNodeDump ()</h3><pre class="programlisting">int         htmlNodeDump                    (<a href="libxml-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf,
170                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
171                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur);</pre><p>
172Dump an HTML node, recursive behaviour,children are printed too,
173and formatting returns are added.</p><p>
174
175</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td>  the HTML buffer output
176</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
177</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the current node
178</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the number of byte written or -1 in case of error
179</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFile"></a>htmlNodeDumpFile ()</h3><pre class="programlisting">void        htmlNodeDumpFile                (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *out,
180                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
181                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur);</pre><p>
182Dump an HTML node, recursive behaviour,children are printed too,
183and formatting returns are added.</p><p>
184
185</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>out</tt></i>�:</span></td><td>  the FILE pointer
186</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
187</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the current node
188</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFileFormat"></a>htmlNodeDumpFileFormat ()</h3><pre class="programlisting">int         htmlNodeDumpFileFormat          (<GTKDOCLINK xmlns="http://www.w3.org/TR/xhtml1/transitional" HREF="FILE-CAPS">FILE</GTKDOCLINK> *out,
189                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
190                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur,
191                                             const char *encoding,
192                                             int format);</pre><p>
193Dump an HTML node, recursive behaviour,children are printed too.
194</p><p>
195TODO: if encoding == NULL try to save in the doc encoding</p><p>
196
197</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>out</tt></i>�:</span></td><td>  the FILE pointer
198</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
199</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the current node
200</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td> the document encoding
201</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>�:</span></td><td>  should formatting spaces been added
202</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the number of byte written or -1 in case of failure.
203</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlSaveFileEnc"></a>htmlSaveFileEnc ()</h3><pre class="programlisting">int         htmlSaveFileEnc                 (const char *filename,
204                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
205                                             const char *encoding);</pre><p>
206Dump an HTML document to a file using a given encoding
207and formatting returns/spaces are added.</p><p>
208
209</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>filename</tt></i>�:</span></td><td>  the filename
210</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
211</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td> the document encoding
212</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the number of byte written or -1 in case of failure.
213</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlSaveFileFormat"></a>htmlSaveFileFormat ()</h3><pre class="programlisting">int         htmlSaveFileFormat              (const char *filename,
214                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
215                                             const char *encoding,
216                                             int format);</pre><p>
217Dump an HTML document to a file using a given encoding.</p><p>
218
219</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>filename</tt></i>�:</span></td><td>  the filename
220</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
221</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td> the document encoding
222</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>�:</span></td><td>  should formatting spaces been added
223</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the number of byte written or -1 in case of failure.
224</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNodeDumpFormatOutput"></a>htmlNodeDumpFormatOutput ()</h3><pre class="programlisting">void        htmlNodeDumpFormatOutput        (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
225                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
226                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur,
227                                             const char *encoding,
228                                             int format);</pre><p>
229Dump an HTML node, recursive behaviour,children are printed too.</p><p>
230
231</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td>  the HTML buffer output
232</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
233</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the current node
234</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td>  the encoding string
235</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>�:</span></td><td>  should formatting spaces been added
236</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlDocContentDumpOutput"></a>htmlDocContentDumpOutput ()</h3><pre class="programlisting">void        htmlDocContentDumpOutput        (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
237                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
238                                             const char *encoding);</pre><p>
239Dump an HTML document. Formating return/spaces are added.</p><p>
240
241</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td>  the HTML buffer output
242</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
243</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td>  the encoding string
244</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlDocContentDumpFormatOutput"></a>htmlDocContentDumpFormatOutput ()</h3><pre class="programlisting">void        htmlDocContentDumpFormatOutput  (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
245                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur,
246                                             const char *encoding,
247                                             int format);</pre><p>
248Dump an HTML document.</p><p>
249
250</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td>  the HTML buffer output
251</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the document
252</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td>  the encoding string
253</td></tr><tr><td><span class="term"><i class="parameter"><tt>format</tt></i>�:</span></td><td>  should formatting spaces been added
254</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlIsBooleanAttr"></a>htmlIsBooleanAttr ()</h3><pre class="programlisting">int         htmlIsBooleanAttr               (const <a href="libxml-tree.html#xmlChar">xmlChar</a> *name);</pre><p>
255Determine if a given attribute is a boolean attribute.</p><p>
256
257</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>�:</span></td><td>  the name of the attribute to check
258</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> false if the attribute is not boolean, true otherwise.
259</td></tr></tbody></table></div></div><hr xmlns="http://www.w3.org/TR/xhtml1/transitional"></hr><div class="refsect2" lang="en"><h3><a name="htmlNodeDumpOutput"></a>htmlNodeDumpOutput ()</h3><pre class="programlisting">void        htmlNodeDumpOutput              (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf,
260                                             <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc,
261                                             <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> cur,
262                                             const char *encoding);</pre><p>
263Dump an HTML node, recursive behaviour,children are printed too,
264and formatting returns/spaces are added.</p><p>
265
266</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>buf</tt></i>�:</span></td><td>  the HTML buffer output
267</td></tr><tr><td><span class="term"><i class="parameter"><tt>doc</tt></i>�:</span></td><td>  the document
268</td></tr><tr><td><span class="term"><i class="parameter"><tt>cur</tt></i>�:</span></td><td>  the current node
269</td></tr><tr><td><span class="term"><i class="parameter"><tt>encoding</tt></i>�:</span></td><td>  the encoding string
270</td></tr></tbody></table></div></div></div></div><table xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libxml-list.html"><b>&lt;&lt;�list</b></a></td><td align="right"><a accesskey="n" href="libxml-parserInternals.html"><b>parserInternals�&gt;&gt;</b></a></td></tr></table></body></html>
271