struct htmlElemDesc {
const char *name; /* The tag name */
int startTag; /* Whether the start tag can be implied */
int endTag; /* Whether the end tag can be implied */
int empty; /* Is this an empty element ? */
int depr; /* Is this a deprecated element ? */
int dtd; /* 1: only in Loose DTD, 2: only Frameset one */
const char *desc; /* the description */
};
htmlElemDescPtr
typedef htmlElemDesc *htmlElemDescPtr;
struct htmlEntityDesc
struct htmlEntityDesc {
int value; /* the UNICODE value for the character */
const char *name; /* The entity name */
const char *desc; /* the description */
};
The HTmL DtD allows a tag to implicitely close other tags.
The list is kept in htmlStartClose array. This function checks
if a tag is autoclosed by one of it's child
The HTmL DtD allows a tag to implicitely close other tags.
The list is kept in htmlStartClose array. This function checks
if the element or one of it's children would autoclose the
given tag.
parse an HTML in-memory document and build a tree.
It use the given SAX function block to handle the parsing callback.
If sax is NULL, fallback to the default DOM tree building routines.
cur :
a pointer to an array of xmlChar
encoding :
a free form C string describing the HTML document encoding, or NULL
sax :
the SAX handler block
userData :
if using SAX, this pointer will be provided on callbacks.
parse an HTML file and build a tree. Automatic support for ZLIB/Compress
compressed document is provided by default if found at compile-time.
It use the given SAX function block to handle the parsing callback.
If sax is NULL, fallback to the default DOM tree building routines.
filename :
the filename
encoding :
a free form C string describing the HTML document encoding, or NULL
sax :
the SAX handler block
userData :
if using SAX, this pointer will be provided on callbacks.
Create a parser context for using the HTML parser in push mode
To allow content encoding detection, size should be >= 4
The value of filename is used for fetching external entities
and error/warning reports.
sax :
a SAX handler
user_data :
The user data returned on SAX callbacks
chunk :
a pointer to an array of chars
size :
number of chars in the array
filename :
an optional file name or URI
enc :
an optional encoding
Returns :
the new parser context or NULL
htmlParseChunk ()
int htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);