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