2001-02-23 17:55:21 +00:00
/*
2003-11-18 20:56:51 +00:00
* Summary : specific APIs to process HTML tree , especially serialization
* Description : this module implements a few function needed to process
* tree in an HTML specific way .
2001-02-23 17:55:21 +00:00
*
2003-11-18 20:56:51 +00:00
* Copy : See Copyright for the status of this software .
2001-02-23 17:55:21 +00:00
*
2003-11-18 20:56:51 +00:00
* Author : Daniel Veillard
2001-02-23 17:55:21 +00:00
*/
# ifndef __HTML_TREE_H__
# define __HTML_TREE_H__
# include <stdio.h>
2003-08-25 09:05:12 +00:00
# include <libxml/xmlversion.h>
2001-02-23 17:55:21 +00:00
# include <libxml/tree.h>
# include <libxml/HTMLparser.h>
2004-06-27 12:08:10 +00:00
# ifdef LIBXML_HTML_ENABLED
2001-02-23 17:55:21 +00:00
# ifdef __cplusplus
extern " C " {
# endif
2002-08-12 13:27:28 +00:00
2001-05-19 14:59:49 +00:00
/**
* HTML_TEXT_NODE :
*
2002-03-12 18:46:39 +00:00
* Macro . A text node in a HTML document is really implemented
2001-05-19 14:59:49 +00:00
* the same way as a text node in an XML document .
*/
2001-02-23 17:55:21 +00:00
# define HTML_TEXT_NODE XML_TEXT_NODE
2001-05-19 14:59:49 +00:00
/**
* HTML_ENTITY_REF_NODE :
*
2002-03-12 18:46:39 +00:00
* Macro . An entity reference in a HTML document is really implemented
2001-05-19 14:59:49 +00:00
* the same way as an entity reference in an XML document .
*/
2001-02-23 17:55:21 +00:00
# define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
2001-05-19 14:59:49 +00:00
/**
* HTML_COMMENT_NODE :
*
2002-03-12 18:46:39 +00:00
* Macro . A comment in a HTML document is really implemented
2001-05-19 14:59:49 +00:00
* the same way as a comment in an XML document .
*/
2001-02-23 17:55:21 +00:00
# define HTML_COMMENT_NODE XML_COMMENT_NODE
2001-05-19 14:59:49 +00:00
/**
* HTML_PRESERVE_NODE :
*
2002-03-12 18:46:39 +00:00
* Macro . A preserved node in a HTML document is really implemented
2001-05-19 14:59:49 +00:00
* the same way as a CDATA section in an XML document .
*/
2001-02-23 17:55:21 +00:00
# define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
2001-05-19 14:59:49 +00:00
/**
* HTML_PI_NODE :
*
2002-03-12 18:46:39 +00:00
* Macro . A processing instruction in a HTML document is really implemented
2001-05-19 14:59:49 +00:00
* the same way as a processing instruction in an XML document .
*/
2001-04-24 15:52:00 +00:00
# define HTML_PI_NODE XML_PI_NODE
2001-02-23 17:55:21 +00:00
2022-12-08 02:48:27 +01:00
XMLPUBFUN htmlDocPtr
2003-08-25 09:05:12 +00:00
htmlNewDoc ( const xmlChar * URI ,
2001-02-23 17:55:21 +00:00
const xmlChar * ExternalID ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN htmlDocPtr
2003-08-25 09:05:12 +00:00
htmlNewDocNoDtD ( const xmlChar * URI ,
2001-02-23 17:55:21 +00:00
const xmlChar * ExternalID ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN const xmlChar *
2003-08-25 09:05:12 +00:00
htmlGetMetaEncoding ( htmlDocPtr doc ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlSetMetaEncoding ( htmlDocPtr doc ,
2001-02-23 17:55:21 +00:00
const xmlChar * encoding ) ;
2003-09-29 13:20:24 +00:00
# ifdef LIBXML_OUTPUT_ENABLED
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2003-08-25 09:05:12 +00:00
htmlDocDumpMemory ( xmlDocPtr cur ,
2002-01-20 22:08:18 +00:00
xmlChar * * mem ,
2001-02-23 17:55:21 +00:00
int * size ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2005-12-20 15:55:14 +00:00
htmlDocDumpMemoryFormat ( xmlDocPtr cur ,
xmlChar * * mem ,
int * size ,
int format ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlDocDump ( FILE * f ,
2001-02-23 17:55:21 +00:00
xmlDocPtr cur ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlSaveFile ( const char * filename ,
2001-02-23 17:55:21 +00:00
xmlDocPtr cur ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlNodeDump ( xmlBufferPtr buf ,
2001-02-23 17:55:21 +00:00
xmlDocPtr doc ,
xmlNodePtr cur ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2003-08-25 09:05:12 +00:00
htmlNodeDumpFile ( FILE * out ,
2001-02-23 17:55:21 +00:00
xmlDocPtr doc ,
xmlNodePtr cur ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlNodeDumpFileFormat ( FILE * out ,
2001-06-13 13:48:46 +00:00
xmlDocPtr doc ,
xmlNodePtr cur ,
const char * encoding ,
int format ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlSaveFileEnc ( const char * filename ,
2001-02-23 17:55:21 +00:00
xmlDocPtr cur ,
const char * encoding ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-08-25 09:05:12 +00:00
htmlSaveFileFormat ( const char * filename ,
2001-06-13 13:48:46 +00:00
xmlDocPtr cur ,
const char * encoding ,
int format ) ;
2001-02-23 17:55:21 +00:00
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2003-08-25 09:05:12 +00:00
htmlNodeDumpFormatOutput ( xmlOutputBufferPtr buf ,
2001-11-01 14:31:22 +00:00
xmlDocPtr doc ,
xmlNodePtr cur ,
const char * encoding ,
int format ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2003-08-25 09:05:12 +00:00
htmlDocContentDumpOutput ( xmlOutputBufferPtr buf ,
2001-02-23 17:55:21 +00:00
xmlDocPtr cur ,
const char * encoding ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2003-08-25 09:05:12 +00:00
htmlDocContentDumpFormatOutput ( xmlOutputBufferPtr buf ,
2001-11-01 14:31:22 +00:00
xmlDocPtr cur ,
const char * encoding ,
int format ) ;
2022-12-08 02:48:27 +01:00
XMLPUBFUN void
2012-09-11 13:26:36 +08:00
htmlNodeDumpOutput ( xmlOutputBufferPtr buf ,
2003-08-25 09:05:12 +00:00
xmlDocPtr doc ,
2012-09-11 13:26:36 +08:00
xmlNodePtr cur ,
2003-08-25 09:05:12 +00:00
const char * encoding ) ;
2002-12-12 00:15:55 +00:00
2003-09-29 13:20:24 +00:00
# endif /* LIBXML_OUTPUT_ENABLED */
2002-08-12 13:27:28 +00:00
2022-12-08 02:48:27 +01:00
XMLPUBFUN int
2003-09-29 13:20:24 +00:00
htmlIsBooleanAttr ( const xmlChar * name ) ;
2002-08-12 13:27:28 +00:00
2001-02-23 17:55:21 +00:00
# ifdef __cplusplus
}
# endif
2004-06-27 12:08:10 +00:00
# endif /* LIBXML_HTML_ENABLED */
2001-02-23 17:55:21 +00:00
# endif /* __HTML_TREE_H__ */