HTMLtree

HTMLtree —

Synopsis




#define     HTML_TEXT_NODE
#define     HTML_ENTITY_REF_NODE
#define     HTML_COMMENT_NODE
#define     HTML_PRESERVE_NODE
#define     HTML_PI_NODE
htmlDocPtr  htmlNewDoc                      (const xmlChar *URI,
                                             const xmlChar *ExternalID);
htmlDocPtr  htmlNewDocNoDtD                 (const xmlChar *URI,
                                             const xmlChar *ExternalID);
const xmlChar* htmlGetMetaEncoding          (htmlDocPtr doc);
int         htmlSetMetaEncoding             (htmlDocPtr doc,
                                             const xmlChar *encoding);
void        htmlDocDumpMemory               (xmlDocPtr cur,
                                             xmlChar **mem,
                                             int *size);
int         htmlDocDump                     (FILE *f,
                                             xmlDocPtr cur);
int         htmlSaveFile                    (const char *filename,
                                             xmlDocPtr cur);
int         htmlNodeDump                    (xmlBufferPtr buf,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur);
void        htmlNodeDumpFile                (FILE *out,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur);
int         htmlNodeDumpFileFormat          (FILE *out,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur,
                                             const char *encoding,
                                             int format);
int         htmlSaveFileEnc                 (const char *filename,
                                             xmlDocPtr cur,
                                             const char *encoding);
int         htmlSaveFileFormat              (const char *filename,
                                             xmlDocPtr cur,
                                             const char *encoding,
                                             int format);
void        htmlNodeDumpFormatOutput        (xmlOutputBufferPtr buf,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur,
                                             const char *encoding,
                                             int format);
void        htmlDocContentDumpOutput        (xmlOutputBufferPtr buf,
                                             xmlDocPtr cur,
                                             const char *encoding);
void        htmlDocContentDumpFormatOutput  (xmlOutputBufferPtr buf,
                                             xmlDocPtr cur,
                                             const char *encoding,
                                             int format);
int         htmlIsBooleanAttr               (const xmlChar *name);
void        htmlNodeDumpOutput              (xmlOutputBufferPtr buf,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur,
                                             const char *encoding);

Description

Details

HTML_TEXT_NODE

#define     HTML_TEXT_NODE

Macro. A text node in a HTML document is really implemented the same way as a text node in an XML document.


HTML_ENTITY_REF_NODE

#define     HTML_ENTITY_REF_NODE

Macro. An entity reference in a HTML document is really implemented the same way as an entity reference in an XML document.


HTML_COMMENT_NODE

#define     HTML_COMMENT_NODE

Macro. A comment in a HTML document is really implemented the same way as a comment in an XML document.


HTML_PRESERVE_NODE

#define     HTML_PRESERVE_NODE

Macro. A preserved node in a HTML document is really implemented the same way as a CDATA section in an XML document.


HTML_PI_NODE

#define     HTML_PI_NODE

Macro. A processing instruction in a HTML document is really implemented the same way as a processing instruction in an XML document.


htmlNewDoc ()

htmlDocPtr  htmlNewDoc                      (const xmlChar *URI,
                                             const xmlChar *ExternalID);

Creates a new HTML document

URI :
ExternalID :
Returns :

htmlNewDocNoDtD ()

htmlDocPtr  htmlNewDocNoDtD                 (const xmlChar *URI,
                                             const xmlChar *ExternalID);

Creates a new HTML document without a DTD node if URI and ExternalID are NULL

URI :
ExternalID :
Returns :

htmlGetMetaEncoding ()

const xmlChar* htmlGetMetaEncoding          (htmlDocPtr doc);

Encoding definition lookup in the Meta tags

doc :
Returns :

htmlSetMetaEncoding ()

int         htmlSetMetaEncoding             (htmlDocPtr doc,
                                             const xmlChar *encoding);

Sets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated.

doc :
encoding :
Returns :

htmlDocDumpMemory ()

void        htmlDocDumpMemory               (xmlDocPtr cur,
                                             xmlChar **mem,
                                             int *size);

Dump an HTML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

cur :
mem :
size :

htmlDocDump ()

int         htmlDocDump                     (FILE *f,
                                             xmlDocPtr cur);

Dump an HTML document to an open FILE.

f :
cur :
Returns :

htmlSaveFile ()

int         htmlSaveFile                    (const char *filename,
                                             xmlDocPtr cur);

Dump an HTML document to a file. If filename is "-" the stdout file is used.

filename :
cur :
Returns :

htmlNodeDump ()

int         htmlNodeDump                    (xmlBufferPtr buf,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur);

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

buf :
doc :
cur :
Returns :

htmlNodeDumpFile ()

void        htmlNodeDumpFile                (FILE *out,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur);

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns are added.

out :
doc :
cur :

htmlNodeDumpFileFormat ()

int         htmlNodeDumpFileFormat          (FILE *out,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur,
                                             const char *encoding,
                                             int format);

Dump an HTML node, recursive behaviour,children are printed too.

TODO: if encoding == NULL try to save in the doc encoding

out :
doc :
cur :
encoding :
format :
Returns :

htmlSaveFileEnc ()

int         htmlSaveFileEnc                 (const char *filename,
                                             xmlDocPtr cur,
                                             const char *encoding);

Dump an HTML document to a file using a given encoding and formatting returns/spaces are added.

filename :
cur :
encoding :
Returns :

htmlSaveFileFormat ()

int         htmlSaveFileFormat              (const char *filename,
                                             xmlDocPtr cur,
                                             const char *encoding,
                                             int format);

Dump an HTML document to a file using a given encoding.

filename :
cur :
encoding :
format :
Returns :

htmlNodeDumpFormatOutput ()

void        htmlNodeDumpFormatOutput        (xmlOutputBufferPtr buf,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur,
                                             const char *encoding,
                                             int format);

Dump an HTML node, recursive behaviour,children are printed too.

buf :
doc :
cur :
encoding :
format :

htmlDocContentDumpOutput ()

void        htmlDocContentDumpOutput        (xmlOutputBufferPtr buf,
                                             xmlDocPtr cur,
                                             const char *encoding);

Dump an HTML document. Formating return/spaces are added.

buf :
cur :
encoding :

htmlDocContentDumpFormatOutput ()

void        htmlDocContentDumpFormatOutput  (xmlOutputBufferPtr buf,
                                             xmlDocPtr cur,
                                             const char *encoding,
                                             int format);

Dump an HTML document.

buf :
cur :
encoding :
format :

htmlIsBooleanAttr ()

int         htmlIsBooleanAttr               (const xmlChar *name);

Determine if a given attribute is a boolean attribute.

name :
Returns :

htmlNodeDumpOutput ()

void        htmlNodeDumpOutput              (xmlOutputBufferPtr buf,
                                             xmlDocPtr doc,
                                             xmlNodePtr cur,
                                             const char *encoding);

Dump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added.

buf :
doc :
cur :
encoding :