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
11
#ifndef __HTML_TREE_H__
12
#define __HTML_TREE_H__
15
#include <libxml/xmlversion.h>
16
#include <libxml/tree.h>
17
#include <libxml/HTMLparser.h>
19
#ifdef LIBXML_HTML_ENABLED
29
* Macro. A text node in a HTML document is really implemented
30
* the same way as a text node in an XML document.
32
#define HTML_TEXT_NODE XML_TEXT_NODE
34
* HTML_ENTITY_REF_NODE:
36
* Macro. An entity reference in a HTML document is really implemented
37
* the same way as an entity reference in an XML document.
39
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
43
* Macro. A comment in a HTML document is really implemented
44
* the same way as a comment in an XML document.
46
#define HTML_COMMENT_NODE XML_COMMENT_NODE
50
* Macro. A preserved node in a HTML document is really implemented
51
* the same way as a CDATA section in an XML document.
53
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
57
* Macro. A processing instruction in a HTML document is really implemented
58
* the same way as a processing instruction in an XML document.
60
#define HTML_PI_NODE XML_PI_NODE
62
XMLPUBFUN htmlDocPtr XMLCALL
63
htmlNewDoc (const xmlChar *URI,
64
const xmlChar *ExternalID);
65
XMLPUBFUN htmlDocPtr XMLCALL
66
htmlNewDocNoDtD (const xmlChar *URI,
67
const xmlChar *ExternalID);
68
XMLPUBFUN const xmlChar * XMLCALL
69
htmlGetMetaEncoding (htmlDocPtr doc);
71
htmlSetMetaEncoding (htmlDocPtr doc,
72
const xmlChar *encoding);
73
#ifdef LIBXML_OUTPUT_ENABLED
74
XMLPUBFUN void XMLCALL
75
htmlDocDumpMemory (xmlDocPtr cur,
78
XMLPUBFUN void XMLCALL
79
htmlDocDumpMemoryFormat (xmlDocPtr cur,
87
htmlSaveFile (const char *filename,
90
htmlNodeDump (xmlBufferPtr buf,
93
XMLPUBFUN void XMLCALL
94
htmlNodeDumpFile (FILE *out,
98
htmlNodeDumpFileFormat (FILE *out,
101
const char *encoding,
103
XMLPUBFUN int XMLCALL
104
htmlSaveFileEnc (const char *filename,
106
const char *encoding);
107
XMLPUBFUN int XMLCALL
108
htmlSaveFileFormat (const char *filename,
110
const char *encoding,
113
XMLPUBFUN void XMLCALL
114
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
117
const char *encoding,
119
XMLPUBFUN void XMLCALL
120
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
122
const char *encoding);
123
XMLPUBFUN void XMLCALL
124
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
126
const char *encoding,
128
XMLPUBFUN void XMLCALL
129
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
132
const char *encoding);
134
#endif /* LIBXML_OUTPUT_ENABLED */
136
XMLPUBFUN int XMLCALL
137
htmlIsBooleanAttr (const xmlChar *name);
144
#endif /* LIBXML_HTML_ENABLED */
146
#endif /* __HTML_TREE_H__ */