blob: 29b283ac74bae6db2f6f9fa1555beb6bec662a1b [file] [log] [blame]
<HTML
><HEAD
><TITLE
>HTMLtree</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.59"><LINK
REL="HOME"
TITLE="Gnome XML Library Reference Manual"
HREF="book1.html"><LINK
REL="UP"
TITLE="Libxml Library Reference"
HREF="libxml-lib.html"><LINK
REL="PREVIOUS"
TITLE="HTMLparser"
HREF="libxml-htmlparser.html"><LINK
REL="NEXT"
TITLE="xpath"
HREF="libxml-xpath.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TH
COLSPAN="4"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="5"
>Gnome XML Library Reference Manual</FONT
></TH
></TR
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="libxml-htmlparser.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libxml-lib.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="libxml-xpath.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="LIBXML-HTMLTREE"
>HTMLtree</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN10814"
></A
><H2
>Name</H2
>HTMLtree&nbsp;--&nbsp;</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN10817"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;
#define <A
HREF="libxml-htmltree.html#HTML-TEXT-NODE-CAPS"
>HTML_TEXT_NODE</A
>
#define <A
HREF="libxml-htmltree.html#HTML-ENTITY-REF-NODE-CAPS"
>HTML_ENTITY_REF_NODE</A
>
#define <A
HREF="libxml-htmltree.html#HTML-COMMENT-NODE-CAPS"
>HTML_COMMENT_NODE</A
>
#define <A
HREF="libxml-htmltree.html#HTML-PRESERVE-NODE-CAPS"
>HTML_PRESERVE_NODE</A
>
#define <A
HREF="libxml-htmltree.html#HTML-PI-NODE-CAPS"
>HTML_PI_NODE</A
>
<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,
const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *ExternalID);
<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,
const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *ExternalID);
const <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);
int <A
HREF="libxml-htmltree.html#HTMLSETMETAENCODING"
>htmlSetMetaEncoding</A
> (<A
HREF="libxml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A
> doc,
const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *encoding);
void <A
HREF="libxml-htmltree.html#HTMLDOCDUMPMEMORY"
>htmlDocDumpMemory</A
> (<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur,
<A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> **mem,
int *size);
int <A
HREF="libxml-htmltree.html#HTMLDOCDUMP"
>htmlDocDump</A
> (<GTKDOCLINK
HREF="FILE-CAPS"
>FILE</GTKDOCLINK
> *f,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur);
int <A
HREF="libxml-htmltree.html#HTMLSAVEFILE"
>htmlSaveFile</A
> (const char *filename,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur);
void <A
HREF="libxml-htmltree.html#HTMLNODEDUMP"
>htmlNodeDump</A
> (<A
HREF="libxml-tree.html#XMLBUFFERPTR"
>xmlBufferPtr</A
> buf,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> doc,
<A
HREF="libxml-tree.html#XMLNODEPTR"
>xmlNodePtr</A
> cur);
void <A
HREF="libxml-htmltree.html#HTMLNODEDUMPFILE"
>htmlNodeDumpFile</A
> (<GTKDOCLINK
HREF="FILE-CAPS"
>FILE</GTKDOCLINK
> *out,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> doc,
<A
HREF="libxml-tree.html#XMLNODEPTR"
>xmlNodePtr</A
> cur);
int <A
HREF="libxml-htmltree.html#HTMLSAVEFILEENC"
>htmlSaveFileEnc</A
> (const char *filename,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur,
const char *encoding);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN10857"
></A
><H2
>Description</H2
><P
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN10860"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN10862"
></A
><H3
><A
NAME="HTML-TEXT-NODE-CAPS"
></A
>HTML_TEXT_NODE</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define HTML_TEXT_NODE XML_TEXT_NODE</PRE
></TD
></TR
></TABLE
><P
>Macro, a text node in a HTML document is really implemented
the same way as a text node in an XML document.</P
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10868"
></A
><H3
><A
NAME="HTML-ENTITY-REF-NODE-CAPS"
></A
>HTML_ENTITY_REF_NODE</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE</PRE
></TD
></TR
></TABLE
><P
>Macro, an entity reference in a HTML document is really implemented
the same way as an entity reference in an XML document.</P
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10874"
></A
><H3
><A
NAME="HTML-COMMENT-NODE-CAPS"
></A
>HTML_COMMENT_NODE</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define HTML_COMMENT_NODE XML_COMMENT_NODE</PRE
></TD
></TR
></TABLE
><P
>Macro, a comment in a HTML document is really implemented
the same way as a comment in an XML document.</P
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10880"
></A
><H3
><A
NAME="HTML-PRESERVE-NODE-CAPS"
></A
>HTML_PRESERVE_NODE</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE</PRE
></TD
></TR
></TABLE
><P
>Macro, a preserved node in a HTML document is really implemented
the same way as a CDATA section in an XML document.</P
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10886"
></A
><H3
><A
NAME="HTML-PI-NODE-CAPS"
></A
>HTML_PI_NODE</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>#define HTML_PI_NODE XML_PI_NODE</PRE
></TD
></TR
></TABLE
><P
>Macro, a processing instruction in a HTML document is really implemented
the same way as a processing instruction in an XML document.</P
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10892"
></A
><H3
><A
NAME="HTMLNEWDOC"
></A
>htmlNewDoc ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="libxml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A
> htmlNewDoc (const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *URI,
const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *ExternalID);</PRE
></TD
></TR
></TABLE
><P
></P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN10901"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>URI</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> URI for the dtd, or NULL</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>ExternalID</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the external ID of the DTD, or NULL</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>a new document</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10918"
></A
><H3
><A
NAME="HTMLNEWDOCNODTD"
></A
>htmlNewDocNoDtD ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="libxml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A
> htmlNewDocNoDtD (const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *URI,
const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *ExternalID);</PRE
></TD
></TR
></TABLE
><P
></P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN10927"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>URI</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> URI for the dtd, or NULL</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>ExternalID</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the external ID of the DTD, or NULL</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>a new document, do not intialize the DTD if not provided</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10944"
></A
><H3
><A
NAME="HTMLGETMETAENCODING"
></A
>htmlGetMetaEncoding ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
>* htmlGetMetaEncoding (<A
HREF="libxml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A
> doc);</PRE
></TD
></TR
></TABLE
><P
>Encoding definition lookup in the Meta tags</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN10952"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>doc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>the current encoding as flagged in the HTML source</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10965"
></A
><H3
><A
NAME="HTMLSETMETAENCODING"
></A
>htmlSetMetaEncoding ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int htmlSetMetaEncoding (<A
HREF="libxml-htmlparser.html#HTMLDOCPTR"
>htmlDocPtr</A
> doc,
const <A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> *encoding);</PRE
></TD
></TR
></TABLE
><P
>Sets the current encoding in the Meta tags
NOTE: this will not change the document content encoding, just
the META flag associated.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN10973"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>doc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>encoding</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the encoding string</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>0 in case of success and -1 in case of error</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN10990"
></A
><H3
><A
NAME="HTMLDOCDUMPMEMORY"
></A
>htmlDocDumpMemory ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void htmlDocDumpMemory (<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur,
<A
HREF="libxml-tree.html#XMLCHAR"
>xmlChar</A
> **mem,
int *size);</PRE
></TD
></TR
></TABLE
><P
>Dump an HTML document in memory and return the xmlChar * and it's size.
It's up to the caller to free the memory.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN10998"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>cur</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>mem</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> OUT: the memory pointer</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>size</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> OUT: the memory lenght</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11015"
></A
><H3
><A
NAME="HTMLDOCDUMP"
></A
>htmlDocDump ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int htmlDocDump (<GTKDOCLINK
HREF="FILE-CAPS"
>FILE</GTKDOCLINK
> *f,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur);</PRE
></TD
></TR
></TABLE
><P
>Dump an HTML document to an open FILE.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN11023"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>f</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the FILE*</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>cur</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the number of byte written or -1 in case of failure.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11040"
></A
><H3
><A
NAME="HTMLSAVEFILE"
></A
>htmlSaveFile ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int htmlSaveFile (const char *filename,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur);</PRE
></TD
></TR
></TABLE
><P
>Dump an HTML document to a file. If <TT
CLASS="PARAMETER"
><I
>filename</I
></TT
> is "-" the stdout file is
used.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN11048"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the filename (or URL)</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>cur</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the number of byte written or -1 in case of failure.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11065"
></A
><H3
><A
NAME="HTMLNODEDUMP"
></A
>htmlNodeDump ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void htmlNodeDump (<A
HREF="libxml-tree.html#XMLBUFFERPTR"
>xmlBufferPtr</A
> buf,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> doc,
<A
HREF="libxml-tree.html#XMLNODEPTR"
>xmlNodePtr</A
> cur);</PRE
></TD
></TR
></TABLE
><P
>Dump an HTML node, recursive behaviour,children are printed too.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN11074"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>buf</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the HTML buffer output</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>doc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>cur</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the current node</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11091"
></A
><H3
><A
NAME="HTMLNODEDUMPFILE"
></A
>htmlNodeDumpFile ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void htmlNodeDumpFile (<GTKDOCLINK
HREF="FILE-CAPS"
>FILE</GTKDOCLINK
> *out,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> doc,
<A
HREF="libxml-tree.html#XMLNODEPTR"
>xmlNodePtr</A
> cur);</PRE
></TD
></TR
></TABLE
><P
>Dump an HTML node, recursive behaviour,children are printed too.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN11100"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>out</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the FILE pointer</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>doc</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>cur</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the current node</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN11117"
></A
><H3
><A
NAME="HTMLSAVEFILEENC"
></A
>htmlSaveFileEnc ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>int htmlSaveFileEnc (const char *filename,
<A
HREF="libxml-tree.html#XMLDOCPTR"
>xmlDocPtr</A
> cur,
const char *encoding);</PRE
></TD
></TR
></TABLE
><P
>Dump an HTML document to a file using a given encoding.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN11124"
></A
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the filename</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>cur</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>encoding</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
>&nbsp;</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the number of byte written or -1 in case of failure.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><BR
CLEAR="all"><BR><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="libxml-htmlparser.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="book1.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libxml-lib.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="libxml-xpath.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>HTMLparser</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>xpath</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>