[964] | 1 | /* |
---|
| 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. |
---|
| 5 | * |
---|
| 6 | * Copy: See Copyright for the status of this software. |
---|
| 7 | * |
---|
| 8 | * Author: Daniel Veillard |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #ifndef __HTML_TREE_H__ |
---|
| 12 | #define __HTML_TREE_H__ |
---|
| 13 | |
---|
| 14 | #include <stdio.h> |
---|
| 15 | #include <libxml/xmlversion.h> |
---|
| 16 | #include <libxml/tree.h> |
---|
| 17 | #include <libxml/HTMLparser.h> |
---|
| 18 | |
---|
| 19 | #ifdef LIBXML_HTML_ENABLED |
---|
| 20 | |
---|
| 21 | #ifdef __cplusplus |
---|
| 22 | extern "C" { |
---|
| 23 | #endif |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | /** |
---|
| 27 | * HTML_TEXT_NODE: |
---|
| 28 | * |
---|
| 29 | * Macro. A text node in a HTML document is really implemented |
---|
| 30 | * the same way as a text node in an XML document. |
---|
| 31 | */ |
---|
| 32 | #define HTML_TEXT_NODE XML_TEXT_NODE |
---|
| 33 | /** |
---|
| 34 | * HTML_ENTITY_REF_NODE: |
---|
| 35 | * |
---|
| 36 | * Macro. An entity reference in a HTML document is really implemented |
---|
| 37 | * the same way as an entity reference in an XML document. |
---|
| 38 | */ |
---|
| 39 | #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE |
---|
| 40 | /** |
---|
| 41 | * HTML_COMMENT_NODE: |
---|
| 42 | * |
---|
| 43 | * Macro. A comment in a HTML document is really implemented |
---|
| 44 | * the same way as a comment in an XML document. |
---|
| 45 | */ |
---|
| 46 | #define HTML_COMMENT_NODE XML_COMMENT_NODE |
---|
| 47 | /** |
---|
| 48 | * HTML_PRESERVE_NODE: |
---|
| 49 | * |
---|
| 50 | * Macro. A preserved node in a HTML document is really implemented |
---|
| 51 | * the same way as a CDATA section in an XML document. |
---|
| 52 | */ |
---|
| 53 | #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE |
---|
| 54 | /** |
---|
| 55 | * HTML_PI_NODE: |
---|
| 56 | * |
---|
| 57 | * Macro. A processing instruction in a HTML document is really implemented |
---|
| 58 | * the same way as a processing instruction in an XML document. |
---|
| 59 | */ |
---|
| 60 | #define HTML_PI_NODE XML_PI_NODE |
---|
| 61 | |
---|
| 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); |
---|
| 70 | XMLPUBFUN int XMLCALL |
---|
| 71 | htmlSetMetaEncoding (htmlDocPtr doc, |
---|
| 72 | const xmlChar *encoding); |
---|
| 73 | #ifdef LIBXML_OUTPUT_ENABLED |
---|
| 74 | XMLPUBFUN void XMLCALL |
---|
| 75 | htmlDocDumpMemory (xmlDocPtr cur, |
---|
| 76 | xmlChar **mem, |
---|
| 77 | int *size); |
---|
| 78 | XMLPUBFUN int XMLCALL |
---|
| 79 | htmlDocDump (FILE *f, |
---|
| 80 | xmlDocPtr cur); |
---|
| 81 | XMLPUBFUN int XMLCALL |
---|
| 82 | htmlSaveFile (const char *filename, |
---|
| 83 | xmlDocPtr cur); |
---|
| 84 | XMLPUBFUN int XMLCALL |
---|
| 85 | htmlNodeDump (xmlBufferPtr buf, |
---|
| 86 | xmlDocPtr doc, |
---|
| 87 | xmlNodePtr cur); |
---|
| 88 | XMLPUBFUN void XMLCALL |
---|
| 89 | htmlNodeDumpFile (FILE *out, |
---|
| 90 | xmlDocPtr doc, |
---|
| 91 | xmlNodePtr cur); |
---|
| 92 | XMLPUBFUN int XMLCALL |
---|
| 93 | htmlNodeDumpFileFormat (FILE *out, |
---|
| 94 | xmlDocPtr doc, |
---|
| 95 | xmlNodePtr cur, |
---|
| 96 | const char *encoding, |
---|
| 97 | int format); |
---|
| 98 | XMLPUBFUN int XMLCALL |
---|
| 99 | htmlSaveFileEnc (const char *filename, |
---|
| 100 | xmlDocPtr cur, |
---|
| 101 | const char *encoding); |
---|
| 102 | XMLPUBFUN int XMLCALL |
---|
| 103 | htmlSaveFileFormat (const char *filename, |
---|
| 104 | xmlDocPtr cur, |
---|
| 105 | const char *encoding, |
---|
| 106 | int format); |
---|
| 107 | |
---|
| 108 | XMLPUBFUN void XMLCALL |
---|
| 109 | htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, |
---|
| 110 | xmlDocPtr doc, |
---|
| 111 | xmlNodePtr cur, |
---|
| 112 | const char *encoding, |
---|
| 113 | int format); |
---|
| 114 | XMLPUBFUN void XMLCALL |
---|
| 115 | htmlDocContentDumpOutput(xmlOutputBufferPtr buf, |
---|
| 116 | xmlDocPtr cur, |
---|
| 117 | const char *encoding); |
---|
| 118 | XMLPUBFUN void XMLCALL |
---|
| 119 | htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, |
---|
| 120 | xmlDocPtr cur, |
---|
| 121 | const char *encoding, |
---|
| 122 | int format); |
---|
| 123 | XMLPUBFUN void XMLCALL |
---|
| 124 | htmlNodeDumpOutput (xmlOutputBufferPtr buf, |
---|
| 125 | xmlDocPtr doc, |
---|
| 126 | xmlNodePtr cur, |
---|
| 127 | const char *encoding); |
---|
| 128 | |
---|
| 129 | #endif /* LIBXML_OUTPUT_ENABLED */ |
---|
| 130 | |
---|
| 131 | XMLPUBFUN int XMLCALL |
---|
| 132 | htmlIsBooleanAttr (const xmlChar *name); |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | #ifdef __cplusplus |
---|
| 136 | } |
---|
| 137 | #endif |
---|
| 138 | |
---|
| 139 | #endif /* LIBXML_HTML_ENABLED */ |
---|
| 140 | |
---|
| 141 | #endif /* __HTML_TREE_H__ */ |
---|
| 142 | |
---|