Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:41:49

0001 /*
0002  * Summary: specific APIs to process HTML tree, especially serialization
0003  * Description: this module implements a few function needed to process
0004  *              tree in an HTML specific way.
0005  *
0006  * Copy: See Copyright for the status of this software.
0007  *
0008  * Author: Daniel Veillard
0009  */
0010 
0011 #ifndef __HTML_TREE_H__
0012 #define __HTML_TREE_H__
0013 
0014 #include <stdio.h>
0015 #include <libxml/xmlversion.h>
0016 #include <libxml/tree.h>
0017 #include <libxml/HTMLparser.h>
0018 
0019 #ifdef LIBXML_HTML_ENABLED
0020 
0021 #ifdef __cplusplus
0022 extern "C" {
0023 #endif
0024 
0025 
0026 /**
0027  * HTML_TEXT_NODE:
0028  *
0029  * Macro. A text node in a HTML document is really implemented
0030  * the same way as a text node in an XML document.
0031  */
0032 #define HTML_TEXT_NODE      XML_TEXT_NODE
0033 /**
0034  * HTML_ENTITY_REF_NODE:
0035  *
0036  * Macro. An entity reference in a HTML document is really implemented
0037  * the same way as an entity reference in an XML document.
0038  */
0039 #define HTML_ENTITY_REF_NODE    XML_ENTITY_REF_NODE
0040 /**
0041  * HTML_COMMENT_NODE:
0042  *
0043  * Macro. A comment in a HTML document is really implemented
0044  * the same way as a comment in an XML document.
0045  */
0046 #define HTML_COMMENT_NODE   XML_COMMENT_NODE
0047 /**
0048  * HTML_PRESERVE_NODE:
0049  *
0050  * Macro. A preserved node in a HTML document is really implemented
0051  * the same way as a CDATA section in an XML document.
0052  */
0053 #define HTML_PRESERVE_NODE  XML_CDATA_SECTION_NODE
0054 /**
0055  * HTML_PI_NODE:
0056  *
0057  * Macro. A processing instruction in a HTML document is really implemented
0058  * the same way as a processing instruction in an XML document.
0059  */
0060 #define HTML_PI_NODE        XML_PI_NODE
0061 
0062 XMLPUBFUN htmlDocPtr
0063         htmlNewDoc      (const xmlChar *URI,
0064                      const xmlChar *ExternalID);
0065 XMLPUBFUN htmlDocPtr
0066         htmlNewDocNoDtD     (const xmlChar *URI,
0067                      const xmlChar *ExternalID);
0068 XMLPUBFUN const xmlChar *
0069         htmlGetMetaEncoding (htmlDocPtr doc);
0070 XMLPUBFUN int
0071         htmlSetMetaEncoding (htmlDocPtr doc,
0072                      const xmlChar *encoding);
0073 #ifdef LIBXML_OUTPUT_ENABLED
0074 XMLPUBFUN void
0075         htmlDocDumpMemory   (xmlDocPtr cur,
0076                      xmlChar **mem,
0077                      int *size);
0078 XMLPUBFUN void
0079         htmlDocDumpMemoryFormat (xmlDocPtr cur,
0080                      xmlChar **mem,
0081                      int *size,
0082                      int format);
0083 XMLPUBFUN int
0084         htmlDocDump     (FILE *f,
0085                      xmlDocPtr cur);
0086 XMLPUBFUN int
0087         htmlSaveFile        (const char *filename,
0088                      xmlDocPtr cur);
0089 XMLPUBFUN int
0090         htmlNodeDump        (xmlBufferPtr buf,
0091                      xmlDocPtr doc,
0092                      xmlNodePtr cur);
0093 XMLPUBFUN void
0094         htmlNodeDumpFile    (FILE *out,
0095                      xmlDocPtr doc,
0096                      xmlNodePtr cur);
0097 XMLPUBFUN int
0098         htmlNodeDumpFileFormat  (FILE *out,
0099                      xmlDocPtr doc,
0100                      xmlNodePtr cur,
0101                      const char *encoding,
0102                      int format);
0103 XMLPUBFUN int
0104         htmlSaveFileEnc     (const char *filename,
0105                      xmlDocPtr cur,
0106                      const char *encoding);
0107 XMLPUBFUN int
0108         htmlSaveFileFormat  (const char *filename,
0109                      xmlDocPtr cur,
0110                      const char *encoding,
0111                      int format);
0112 
0113 XMLPUBFUN void
0114         htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
0115                      xmlDocPtr doc,
0116                      xmlNodePtr cur,
0117                      const char *encoding,
0118                      int format);
0119 XMLPUBFUN void
0120         htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
0121                      xmlDocPtr cur,
0122                      const char *encoding);
0123 XMLPUBFUN void
0124         htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
0125                      xmlDocPtr cur,
0126                      const char *encoding,
0127                      int format);
0128 XMLPUBFUN void
0129         htmlNodeDumpOutput  (xmlOutputBufferPtr buf,
0130                      xmlDocPtr doc,
0131                      xmlNodePtr cur,
0132                      const char *encoding);
0133 
0134 #endif /* LIBXML_OUTPUT_ENABLED */
0135 
0136 XMLPUBFUN int
0137         htmlIsBooleanAttr   (const xmlChar *name);
0138 
0139 
0140 #ifdef __cplusplus
0141 }
0142 #endif
0143 
0144 #endif /* LIBXML_HTML_ENABLED */
0145 
0146 #endif /* __HTML_TREE_H__ */
0147