blob: ff20e75e0f9fedf4947bcf5ebff80e8e7ccf1a79 [file] [log] [blame]
Owen Taylor3473f882001-02-23 17:55:21 +00001/*
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
19extern "C" {
20#endif
21
Daniel Veillardbed7b052001-05-19 14:59:49 +000022/**
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 Taylor3473f882001-02-23 17:55:21 +000028#define HTML_TEXT_NODE XML_TEXT_NODE
Daniel Veillardbed7b052001-05-19 14:59:49 +000029/**
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 Taylor3473f882001-02-23 17:55:21 +000035#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
Daniel Veillardbed7b052001-05-19 14:59:49 +000036/**
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 Taylor3473f882001-02-23 17:55:21 +000042#define HTML_COMMENT_NODE XML_COMMENT_NODE
Daniel Veillardbed7b052001-05-19 14:59:49 +000043/**
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 Taylor3473f882001-02-23 17:55:21 +000049#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
Daniel Veillardbed7b052001-05-19 14:59:49 +000050/**
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 Veillard7533cc82001-04-24 15:52:00 +000056#define HTML_PI_NODE XML_PI_NODE
Owen Taylor3473f882001-02-23 17:55:21 +000057
58htmlDocPtr htmlNewDoc (const xmlChar *URI,
59 const xmlChar *ExternalID);
60htmlDocPtr htmlNewDocNoDtD (const xmlChar *URI,
61 const xmlChar *ExternalID);
62const xmlChar * htmlGetMetaEncoding (htmlDocPtr doc);
63int htmlSetMetaEncoding (htmlDocPtr doc,
64 const xmlChar *encoding);
65void htmlDocDumpMemory (xmlDocPtr cur,
66 xmlChar**mem,
67 int *size);
68int htmlDocDump (FILE *f,
69 xmlDocPtr cur);
70int htmlSaveFile (const char *filename,
71 xmlDocPtr cur);
72void htmlNodeDump (xmlBufferPtr buf,
73 xmlDocPtr doc,
74 xmlNodePtr cur);
75void htmlNodeDumpFile (FILE *out,
76 xmlDocPtr doc,
77 xmlNodePtr cur);
78int htmlSaveFileEnc (const char *filename,
79 xmlDocPtr cur,
80 const char *encoding);
81
82/* This one is imported from xmlIO.h
83void htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
84 xmlDocPtr cur,
85 const char *encoding);
86 */
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* __HTML_TREE_H__ */
92