Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * tree.h : describes the structures found in an tree resulting |
| 3 | * from an XML parsing. |
| 4 | * |
| 5 | * See Copyright for the status of this software. |
| 6 | * |
| 7 | * Daniel.Veillard@w3.org |
| 8 | */ |
| 9 | |
| 10 | #ifndef __HTML_TREE_H__ |
| 11 | #define __HTML_TREE_H__ |
| 12 | |
| 13 | #include <stdio.h> |
| 14 | #include <libxml/tree.h> |
| 15 | #include <libxml/HTMLparser.h> |
| 16 | |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 22 | /** |
| 23 | * HTML_TEXT_NODE: |
| 24 | * |
| 25 | * Macro, a text node in a HTML document is really implemented |
| 26 | * the same way as a text node in an XML document. |
| 27 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 28 | #define HTML_TEXT_NODE XML_TEXT_NODE |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 29 | /** |
| 30 | * HTML_ENTITY_REF_NODE: |
| 31 | * |
| 32 | * Macro, an entity reference in a HTML document is really implemented |
| 33 | * the same way as an entity reference in an XML document. |
| 34 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 35 | #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 36 | /** |
| 37 | * HTML_COMMENT_NODE: |
| 38 | * |
| 39 | * Macro, a comment in a HTML document is really implemented |
| 40 | * the same way as a comment in an XML document. |
| 41 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 42 | #define HTML_COMMENT_NODE XML_COMMENT_NODE |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 43 | /** |
| 44 | * HTML_PRESERVE_NODE: |
| 45 | * |
| 46 | * Macro, a preserved node in a HTML document is really implemented |
| 47 | * the same way as a CDATA section in an XML document. |
| 48 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 49 | #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE |
Daniel Veillard | bed7b05 | 2001-05-19 14:59:49 +0000 | [diff] [blame] | 50 | /** |
| 51 | * HTML_PI_NODE: |
| 52 | * |
| 53 | * Macro, a processing instruction in a HTML document is really implemented |
| 54 | * the same way as a processing instruction in an XML document. |
| 55 | */ |
Daniel Veillard | 7533cc8 | 2001-04-24 15:52:00 +0000 | [diff] [blame] | 56 | #define HTML_PI_NODE XML_PI_NODE |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 57 | |
| 58 | htmlDocPtr htmlNewDoc (const xmlChar *URI, |
| 59 | const xmlChar *ExternalID); |
| 60 | htmlDocPtr htmlNewDocNoDtD (const xmlChar *URI, |
| 61 | const xmlChar *ExternalID); |
| 62 | const xmlChar * htmlGetMetaEncoding (htmlDocPtr doc); |
| 63 | int htmlSetMetaEncoding (htmlDocPtr doc, |
| 64 | const xmlChar *encoding); |
| 65 | void htmlDocDumpMemory (xmlDocPtr cur, |
| 66 | xmlChar**mem, |
| 67 | int *size); |
| 68 | int htmlDocDump (FILE *f, |
| 69 | xmlDocPtr cur); |
| 70 | int htmlSaveFile (const char *filename, |
| 71 | xmlDocPtr cur); |
| 72 | void htmlNodeDump (xmlBufferPtr buf, |
| 73 | xmlDocPtr doc, |
| 74 | xmlNodePtr cur); |
| 75 | void htmlNodeDumpFile (FILE *out, |
| 76 | xmlDocPtr doc, |
| 77 | xmlNodePtr cur); |
Daniel Veillard | c4f631d | 2001-06-14 11:11:59 +0000 | [diff] [blame] | 78 | int htmlNodeDumpFileFormat (FILE *out, |
Daniel Veillard | 95d845f | 2001-06-13 13:48:46 +0000 | [diff] [blame] | 79 | xmlDocPtr doc, |
| 80 | xmlNodePtr cur, |
| 81 | const char *encoding, |
| 82 | int format); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 83 | int htmlSaveFileEnc (const char *filename, |
| 84 | xmlDocPtr cur, |
| 85 | const char *encoding); |
Daniel Veillard | 95d845f | 2001-06-13 13:48:46 +0000 | [diff] [blame] | 86 | int htmlSaveFileFormat (const char *filename, |
| 87 | xmlDocPtr cur, |
| 88 | const char *encoding, |
| 89 | int format); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 90 | |
| 91 | /* This one is imported from xmlIO.h |
| 92 | void htmlDocContentDumpOutput(xmlOutputBufferPtr buf, |
| 93 | xmlDocPtr cur, |
| 94 | const char *encoding); |
| 95 | */ |
| 96 | #ifdef __cplusplus |
| 97 | } |
| 98 | #endif |
| 99 | |
| 100 | #endif /* __HTML_TREE_H__ */ |
| 101 | |