2 * Summary: specific APIs to process HTML tree, especially serialization
3 * Description: this module implements a few function needed to process
4 * tree in an HTML specific way.
6 * Copy: See Copyright for the status of this software.
8 * Author: Daniel Veillard
9 * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
21 #include "libxml2_tree.h"
22 #include "libxml2_htmlparser.h"
31 * Macro. A text node in a HTML document is really implemented
32 * the same way as a text node in an XML document.
34 #define HTML_TEXT_NODE XML_TEXT_NODE
36 * HTML_ENTITY_REF_NODE:
38 * Macro. An entity reference in a HTML document is really implemented
39 * the same way as an entity reference in an XML document.
41 #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
45 * Macro. A comment in a HTML document is really implemented
46 * the same way as a comment in an XML document.
48 #define HTML_COMMENT_NODE XML_COMMENT_NODE
52 * Macro. A preserved node in a HTML document is really implemented
53 * the same way as a CDATA section in an XML document.
55 #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
59 * Macro. A processing instruction in a HTML document is really implemented
60 * the same way as a processing instruction in an XML document.
62 #define HTML_PI_NODE XML_PI_NODE
64 #if defined(LIBXML_HTML_ENABLED) || defined(XMLENGINE_XSLT)
66 XMLPUBFUN htmlDocPtr XMLCALL
67 htmlNewDoc (const xmlChar *URI,
68 const xmlChar *ExternalID);
69 XMLPUBFUN htmlDocPtr XMLCALL
70 htmlNewDocNoDtD (const xmlChar *URI,
71 const xmlChar *ExternalID);
73 htmlSetMetaEncoding (htmlDocPtr doc,
74 const xmlChar *encoding);
76 #ifdef LIBXML_OUTPUT_ENABLED
77 XMLPUBFUN void XMLCALL
78 htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
80 const char *encoding);
81 XMLPUBFUN void XMLCALL
82 htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
87 XMLPUBFUN void XMLCALL
88 htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
94 #endif /* LIBXML_OUTPUT_ENABLED */
97 htmlIsBooleanAttr (const xmlChar *name);
99 #endif /* HTML or XSLT */
101 #ifdef LIBXML_HTML_ENABLED
103 XMLPUBFUN const xmlChar * XMLCALL
104 htmlGetMetaEncoding (htmlDocPtr doc);
106 #ifdef LIBXML_OUTPUT_ENABLED
107 XMLPUBFUN void XMLCALL
108 htmlDocDumpMemory (xmlDocPtr cur,
111 XMLPUBFUN int XMLCALL
112 htmlDocDump (FILE *f,
114 XMLPUBFUN int XMLCALL
115 htmlSaveFile (const char *filename,
117 XMLPUBFUN int XMLCALL
118 htmlNodeDump (xmlBufferPtr buf,
121 XMLPUBFUN void XMLCALL
122 htmlNodeDumpFile (FILE *out,
125 XMLPUBFUN int XMLCALL
126 htmlNodeDumpFileFormat (FILE *out,
129 const char *encoding,
131 XMLPUBFUN int XMLCALL
132 htmlSaveFileEnc (const char *filename,
134 const char *encoding);
135 XMLPUBFUN int XMLCALL
136 htmlSaveFileFormat (const char *filename,
138 const char *encoding,
141 XMLPUBFUN void XMLCALL
142 htmlNodeDumpOutput (xmlOutputBufferPtr buf,
145 const char *encoding);
147 #endif /* LIBXML_OUTPUT_ENABLED */
148 #endif /* LIBXML_HTML_ENABLED */
154 #endif /* HTML_TREE_H */