  
    
    
    
    
    
    
    
  
  
    
      
        
          
libxml2-DOCBparser.html            
Prev          
        
        
          
general.html            
Up          
        
        
          
index.html            
Home          
        
        
          
libxml2-HTMLtree.html            
Next          
        
        
libxml2 Reference Manual      
    
    
      
HTMLparser    
    
HTMLparser - interface for an HTML 4.0 non-verifying parser
    
this module implements an HTML 4.0 non-verifying parser with API compatible with the XML parser ones. It should be able to parse "real world" HTML, even if severely broken from a specification point of view. 
    
Author(s): Daniel Veillard 
    
      
Synopsis
      
#define #htmlDefaultSubelementhtmlDefaultSubelement (elt);
#define 
#htmlElementAllowedHereDeschtmlElementAllowedHereDesc (parent, elt);
#define 
#htmlRequiredAttrshtmlRequiredAttrs (elt);
typedef 
libxml2-parser.html#xmlParserNodeInfoxmlParserNodeInfo  #htmlParserNodeInfohtmlParserNodeInfo ;
typedef 
libxml2-tree.html#xmlParserInputxmlParserInput  #htmlParserInputhtmlParserInput ;
typedef 
libxml2-tree.html#xmlParserCtxtPtrxmlParserCtxtPtr  #htmlParserCtxtPtrhtmlParserCtxtPtr ;
typedef struct _htmlEntityDesc 
#htmlEntityDeschtmlEntityDesc ;
typedef 
libxml2-tree.html#xmlDocPtrxmlDocPtr  #htmlDocPtrhtmlDocPtr ;
typedef 
libxml2-tree.html#xmlSAXHandlerPtrxmlSAXHandlerPtr  #htmlSAXHandlerPtrhtmlSAXHandlerPtr ;
typedef enum 
#htmlStatushtmlStatus ;
typedef 
libxml2-tree.html#xmlNodePtrxmlNodePtr  #htmlNodePtrhtmlNodePtr ;
typedef 
libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * #htmlElemDescPtrhtmlElemDescPtr ;
typedef struct _htmlElemDesc 
#htmlElemDeschtmlElemDesc ;
typedef 
libxml2-tree.html#xmlSAXHandlerxmlSAXHandler  #htmlSAXHandlerhtmlSAXHandler ;
typedef 
libxml2-tree.html#xmlParserInputPtrxmlParserInputPtr  #htmlParserInputPtrhtmlParserInputPtr ;
typedef enum 
#htmlParserOptionhtmlParserOption ;
typedef 
libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  * #htmlEntityDescPtrhtmlEntityDescPtr ;
typedef 
libxml2-tree.html#xmlParserCtxtxmlParserCtxt  #htmlParserCtxthtmlParserCtxt ;
int	
#htmlIsScriptAttributehtmlIsScriptAttribute 		(const libxml2-xmlstring.html#xmlCharxmlChar  * name);
int	
#htmlHandleOmittedElemhtmlHandleOmittedElem 		(int val);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlReadFdhtmlReadFd 		(int fd, 					 const char * URL, 					 const char * encoding, 					 int options);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlReadIOhtmlReadIO 		( libxml2-xmlIO.html#xmlInputReadCallbackxmlInputReadCallback  ioread, 					 libxml2-xmlIO.html#xmlInputCloseCallbackxmlInputCloseCallback  ioclose, 					 void * ioctx, 					 const char * URL, 					 const char * encoding, 					 int options);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlParseFilehtmlParseFile 		(const char * filename, 					 const char * encoding);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlCtxtReadDochtmlCtxtReadDoc 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * URL, 					 const char * encoding, 					 int options);
int	
#htmlAutoCloseTaghtmlAutoCloseTag 		( libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  elem);
int	
#htmlParseChunkhtmlParseChunk 			( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const char * chunk, 					 int size, 					 int terminate);
const 
libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  *	#htmlTagLookuphtmlTagLookup 	(const libxml2-xmlstring.html#xmlCharxmlChar  * tag);
libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr 	#htmlCreateMemoryParserCtxthtmlCreateMemoryParserCtxt 	(const char * buffer, 							 int size);
void	
#htmlCtxtResethtmlCtxtReset 			( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt);
int	
#htmlElementAllowedHerehtmlElementAllowedHere 		(const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * parent, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * elt);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlCtxtReadIOhtmlCtxtReadIO 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 libxml2-xmlIO.html#xmlInputReadCallbackxmlInputReadCallback  ioread, 					 libxml2-xmlIO.html#xmlInputCloseCallbackxmlInputCloseCallback  ioclose, 					 void * ioctx, 					 const char * URL, 					 const char * encoding, 					 int options);
libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr 	#htmlCreatePushParserCtxthtmlCreatePushParserCtxt 	( libxml2-HTMLparser.html#htmlSAXHandlerPtrhtmlSAXHandlerPtr  sax, 							 void * user_data, 							 const char * chunk, 							 int size, 							 const char * filename, 							 libxml2-encoding.html#xmlCharEncodingxmlCharEncoding  enc);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlReadMemoryhtmlReadMemory 		(const char * buffer, 					 int size, 					 const char * URL, 					 const char * encoding, 					 int options);
int	
#htmlIsAutoClosedhtmlIsAutoClosed 		( libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr  doc, 					 libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  elem);
int	
#htmlParseCharRefhtmlParseCharRef 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlReadDochtmlReadDoc 		(const libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * URL, 					 const char * encoding, 					 int options);
int	
#htmlEncodeEntitieshtmlEncodeEntities 		(unsigned char * out, 					 int * outlen, 					 const unsigned char * in, 					 int * inlen, 					 int quoteChar);
libxml2-HTMLparser.html#htmlStatushtmlStatus 	#htmlNodeStatushtmlNodeStatus 		(const libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  node, 					 int legacy);
libxml2-HTMLparser.html#htmlStatushtmlStatus 	#htmlAttrAllowedhtmlAttrAllowed 		(const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * elt, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * attr, 					 int legacy);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlSAXParseFilehtmlSAXParseFile 	(const char * filename, 					 const char * encoding, 					 libxml2-HTMLparser.html#htmlSAXHandlerPtrhtmlSAXHandlerPtr  sax, 					 void * userData);
const 
libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  *	#htmlParseEntityRefhtmlParseEntityRef 	( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 						 const libxml2-xmlstring.html#xmlCharxmlChar  ** str);
libxml2-HTMLparser.html#htmlStatushtmlStatus 	#htmlElementStatusHerehtmlElementStatusHere 	(const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * parent, 					 const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * elt);
const 
libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  *	#htmlEntityValueLookuphtmlEntityValueLookup 	(unsigned int value);
void	
#htmlParseElementhtmlParseElement 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt);
int	
#UTF8ToHtmlUTF8ToHtml 			(unsigned char * out, 					 int * outlen, 					 const unsigned char * in, 					 int * inlen);
const 
libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  *	#htmlEntityLookuphtmlEntityLookup 	(const libxml2-xmlstring.html#xmlCharxmlChar  * name);
void	
#htmlFreeParserCtxthtmlFreeParserCtxt 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlCtxtReadMemoryhtmlCtxtReadMemory 	( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const char * buffer, 					 int size, 					 const char * URL, 					 const char * encoding, 					 int options);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlCtxtReadFdhtmlCtxtReadFd 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 int fd, 					 const char * URL, 					 const char * encoding, 					 int options);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlReadFilehtmlReadFile 		(const char * filename, 					 const char * encoding, 					 int options);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlCtxtReadFilehtmlCtxtReadFile 	( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const char * filename, 					 const char * encoding, 					 int options);
int	
#htmlParseDocumenthtmlParseDocument 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlSAXParseDochtmlSAXParseDoc 		( libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * encoding, 					 libxml2-HTMLparser.html#htmlSAXHandlerPtrhtmlSAXHandlerPtr  sax, 					 void * userData);
int	
#htmlCtxtUseOptionshtmlCtxtUseOptions 		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 int options);
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	#htmlParseDochtmlParseDoc 		( libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * encoding);
    
    
      
Description
    
    
      
Details
      
        
Macro htmlDefaultSubelement
#define #htmlDefaultSubelementhtmlDefaultSubelement (elt);
Returns the default subelement for this element
elt: HTML element         
        
Macro htmlElementAllowedHereDesc
#define #htmlElementAllowedHereDeschtmlElementAllowedHereDesc (parent, elt);
Checks whether an HTML element description may be a direct child of the specified element. Returns 1 if allowed; 0 otherwise.
parent: HTML parent element elt: HTML element         
        
Macro htmlRequiredAttrs
#define #htmlRequiredAttrshtmlRequiredAttrs (elt);
Returns the attributes required for the specified element.
elt: HTML element         
        
Typedef htmlDocPtr
libxml2-tree.html#xmlDocPtrxmlDocPtr  htmlDocPtr;
        
        
Structure htmlElemDesc
struct _htmlElemDesc {
    const char *	name	: The tag name
    char	startTag	: Whether the start tag can be implied
    char	endTag	: Whether the end tag can be implied
    char	saveEndTag	: Whether the end tag should be saved
    char	empty	: Is this an empty element ?
    char	depr	: Is this a deprecated element ?
    char	dtd	: 1: only in Loose DTD, 2: only Frameset one
    char	isinline	: is this a block 0 or inline 1 element
    const char *	desc	: the description NRK Jan.2003 * New fields encapsulating HTML structur
    const char **	subelts	: allowed sub-elements of this element
    const char *	defaultsubelt	: subelement for suggested auto-repair if necessary or NULL
    const char **	attrs_opt	: Optional Attributes
    const char **	attrs_depr	: Additional deprecated attributes
    const char **	attrs_req	: Required attributes
} htmlElemDesc;
        
        
Typedef htmlElemDescPtr
libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * htmlElemDescPtr;
        
        
Structure htmlEntityDesc
struct _htmlEntityDesc {
    unsigned int	value	: the UNICODE value for the character
    const char *	name	: The entity name
    const char *	desc	: the description
} htmlEntityDesc;
        
        
Typedef htmlEntityDescPtr
libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  * htmlEntityDescPtr;
        
        
Typedef htmlNodePtr
libxml2-tree.html#xmlNodePtrxmlNodePtr  htmlNodePtr;
        
        
Typedef htmlParserCtxt
libxml2-tree.html#xmlParserCtxtxmlParserCtxt  htmlParserCtxt;
        
        
Typedef htmlParserCtxtPtr
libxml2-tree.html#xmlParserCtxtPtrxmlParserCtxtPtr  htmlParserCtxtPtr;
        
        
Typedef htmlParserInput
libxml2-tree.html#xmlParserInputxmlParserInput  htmlParserInput;
        
        
Typedef htmlParserInputPtr
libxml2-tree.html#xmlParserInputPtrxmlParserInputPtr  htmlParserInputPtr;
        
        
Typedef htmlParserNodeInfo
libxml2-parser.html#xmlParserNodeInfoxmlParserNodeInfo  htmlParserNodeInfo;
        
        
Enum htmlParserOption
enum #htmlParserOptionhtmlParserOption  {
    
HTML_PARSE_RECOVER  = 1 /* Relaxed parsing */
    
HTML_PARSE_NOERROR  = 32 /* suppress error reports */
    
HTML_PARSE_NOWARNING  = 64 /* suppress warning reports */
    
HTML_PARSE_PEDANTIC  = 128 /* pedantic error reporting */
    
HTML_PARSE_NOBLANKS  = 256 /* remove blank nodes */
    
HTML_PARSE_NONET  = 2048 /* Forbid network access */
    
HTML_PARSE_COMPACT  = 65536 /*  compact small text nodes */
};
        
        
Typedef htmlSAXHandler
libxml2-tree.html#xmlSAXHandlerxmlSAXHandler  htmlSAXHandler;
        
        
Typedef htmlSAXHandlerPtr
libxml2-tree.html#xmlSAXHandlerPtrxmlSAXHandlerPtr  htmlSAXHandlerPtr;
        
        
Enum htmlStatus
enum #htmlStatushtmlStatus  {
    
HTML_NA  = 0 /* something we don't check at all */
    
HTML_INVALID  = 1
    
HTML_DEPRECATED  = 2
    
HTML_VALID  = 4
    
HTML_REQUIRED  = 12 /*  VALID bit set so ( & HTML_VALID ) is TRUE */
};
        
        
UTF8ToHtml ()
int	UTF8ToHtml			(unsigned char * out, 					 int * outlen, 					 const unsigned char * in, 					 int * inlen)Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.
out: a pointer to an array of bytes to store the result outlen: the length of @out in: a pointer to an array of UTF-8 chars inlen: the length of @in Returns: 0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.         
        
htmlAttrAllowed ()
libxml2-HTMLparser.html#htmlStatushtmlStatus 	htmlAttrAllowed		(const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * elt, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * attr, 					 int legacy)Checks whether an libxml2-SAX.html#attributeattribute  is valid for an element Has full knowledge of Required and Deprecated attributes
elt: HTML element attr: HTML libxml2-SAX.html#attributeattribute legacy: whether to allow deprecated attributes Returns: one of HTML_REQUIRED, HTML_VALID, HTML_DEPRECATED, libxml2-HTMLparser.html#HTML_INVALIDHTML_INVALID         
        
htmlAutoCloseTag ()
int	htmlAutoCloseTag		( libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr  doc, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * name, 					 libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  elem)The HTML DTD allows a tag to implicitly 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.
doc: the HTML document name: The tag name elem: the HTML element Returns: 1 if autoclose, 0 otherwise         
        
htmlCreateMemoryParserCtxt ()
libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr 	htmlCreateMemoryParserCtxt	(const char * buffer, 							 int size)Create a parser context for an HTML in-memory document.
buffer: a pointer to a char array size: the size of the array Returns: the new parser context or NULL         
        
htmlCreatePushParserCtxt ()
libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr 	htmlCreatePushParserCtxt	( libxml2-HTMLparser.html#htmlSAXHandlerPtrhtmlSAXHandlerPtr  sax, 							 void * user_data, 							 const char * chunk, 							 int size, 							 const char * filename, 							 libxml2-encoding.html#xmlCharEncodingxmlCharEncoding  enc)Create a parser context for using the HTML parser in push mode 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         
        
htmlCtxtReadDoc ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlCtxtReadDoc		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * URL, 					 const char * encoding, 					 int options)parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context
ctxt: an HTML parser context cur: a pointer to a zero terminated string URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlCtxtReadFd ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlCtxtReadFd		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 int fd, 					 const char * URL, 					 const char * encoding, 					 int options)parse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context
ctxt: an HTML parser context fd: an open file descriptor URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlCtxtReadFile ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlCtxtReadFile	( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const char * filename, 					 const char * encoding, 					 int options)parse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context
ctxt: an HTML parser context filename: a file or URL encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlCtxtReadIO ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlCtxtReadIO		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 libxml2-xmlIO.html#xmlInputReadCallbackxmlInputReadCallback  ioread, 					 libxml2-xmlIO.html#xmlInputCloseCallbackxmlInputCloseCallback  ioclose, 					 void * ioctx, 					 const char * URL, 					 const char * encoding, 					 int options)parse an HTML document from I/O functions and source and build a tree. This reuses the existing @ctxt parser context
ctxt: an HTML parser context ioread: an I/O read function ioclose: an I/O close function ioctx: an I/O handler URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlCtxtReadMemory ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlCtxtReadMemory	( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const char * buffer, 					 int size, 					 const char * URL, 					 const char * encoding, 					 int options)parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context
ctxt: an HTML parser context buffer: a pointer to a char array size: the size of the array URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlCtxtReset ()
void	htmlCtxtReset			( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt)Reset a parser context
ctxt: an HTML parser context         
        
htmlCtxtUseOptions ()
int	htmlCtxtUseOptions		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 int options)Applies the options to the parser context
ctxt: an HTML parser context options: a combination of htmlParserOption(s) Returns: 0 in case of success, the set of unknown or unimplemented options in case of error.         
        
htmlElementAllowedHere ()
int	htmlElementAllowedHere		(const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * parent, 					 const libxml2-xmlstring.html#xmlCharxmlChar  * elt)Checks whether an HTML element may be a direct child of a parent element. Note - doesn't check for deprecated elements
parent: HTML parent element elt: HTML element Returns: 1 if allowed; 0 otherwise.         
        
htmlElementStatusHere ()
libxml2-HTMLparser.html#htmlStatushtmlStatus 	htmlElementStatusHere	(const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * parent, 					 const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  * elt)Checks whether an HTML element may be a direct child of a parent element. and if so whether it is valid or deprecated.
parent: HTML parent element elt: HTML element Returns: one of HTML_VALID, HTML_DEPRECATED, libxml2-HTMLparser.html#HTML_INVALIDHTML_INVALID         
        
htmlEncodeEntities ()
int	htmlEncodeEntities		(unsigned char * out, 					 int * outlen, 					 const unsigned char * in, 					 int * inlen, 					 int quoteChar)Take a block of UTF-8 chars in and try to convert it to an ASCII plus HTML entities block of chars out.
out: a pointer to an array of bytes to store the result outlen: the length of @out in: a pointer to an array of UTF-8 chars inlen: the length of @in quoteChar: the quote character to escape (' or ") or zero. Returns: 0 if success, -2 if the transcoding fails, or -1 otherwise The value of @inlen after return is the number of octets consumed as the return value is positive, else unpredictable. The value of @outlen after return is the number of octets consumed.         
        
htmlEntityLookup ()
const libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  *	htmlEntityLookup	(const libxml2-xmlstring.html#xmlCharxmlChar  * name)Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.
name: the entity name Returns: the associated libxml2-HTMLparser.html#htmlEntityDescPtrhtmlEntityDescPtr  if found, NULL otherwise.         
        
htmlEntityValueLookup ()
const libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  *	htmlEntityValueLookup	(unsigned int value)Lookup the given entity in EntitiesTable TODO: the linear scan is really ugly, an hash table is really needed.
value: the entity's unicode value Returns: the associated libxml2-HTMLparser.html#htmlEntityDescPtrhtmlEntityDescPtr  if found, NULL otherwise.         
        
htmlFreeParserCtxt ()
void	htmlFreeParserCtxt		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt)Free all the memory used by a parser context. However the parsed document in ctxt->myDoc is not freed.
ctxt: an HTML parser context         
        
htmlHandleOmittedElem ()
int	htmlHandleOmittedElem		(int val)Set and return the previous value for handling HTML omitted tags.
val: int 0 or 1 Returns: the last value for 0 for no handling, 1 for auto insertion.         
        
htmlIsAutoClosed ()
int	htmlIsAutoClosed		( libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr  doc, 					 libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  elem)The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child
doc: the HTML document elem: the HTML element Returns: 1 if autoclosed, 0 otherwise         
        
htmlIsScriptAttribute ()
int	htmlIsScriptAttribute		(const libxml2-xmlstring.html#xmlCharxmlChar  * name)Check if an libxml2-SAX.html#attributeattribute  is of content type Script
name: an libxml2-SAX.html#attributeattribute  name Returns: 1 is the libxml2-SAX.html#attributeattribute  is a script 0 otherwise         
        
htmlNodeStatus ()
libxml2-HTMLparser.html#htmlStatushtmlStatus 	htmlNodeStatus		(const libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  node, 					 int legacy)Checks whether the tree node is valid. Experimental (the author only uses the HTML enhancements in a SAX parser)
node: an libxml2-HTMLparser.html#htmlNodePtrhtmlNodePtr  in a tree legacy: whether to allow deprecated elements (YES is faster here for Element nodes) Returns: for Element nodes, a return from libxml2-HTMLparser.html#htmlElementAllowedHerehtmlElementAllowedHere  (if legacy allowed) or libxml2-HTMLparser.html#htmlElementStatusHerehtmlElementStatusHere  (otherwise). for Attribute nodes, a return from libxml2-HTMLparser.html#htmlAttrAllowedhtmlAttrAllowed  for other nodes, libxml2-HTMLparser.html#HTML_NAHTML_NA  (no checks performed)         
        
htmlParseCharRef ()
int	htmlParseCharRef		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt)parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
ctxt: an HTML parser context Returns: the value parsed (as an int)         
        
htmlParseChunk ()
int	htmlParseChunk			( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 					 const char * chunk, 					 int size, 					 int terminate)Parse a Chunk of memory
ctxt: an HTML parser context chunk: an char array size: the size in byte of the chunk terminate: last chunk indicator Returns: zero if no error, the libxml2-xmlerror.html#xmlParserErrorsxmlParserErrors  otherwise.         
        
htmlParseDoc ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlParseDoc		( libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * encoding)parse an HTML in-memory document and build a tree.
cur: a pointer to an array of libxml2-xmlstring.html#xmlCharxmlChar encoding: a free form C string describing the HTML document encoding, or NULL Returns: the resulting document tree         
        
htmlParseDocument ()
int	htmlParseDocument		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt)parse an HTML document (and build a tree if using the standard SAX interface).
ctxt: an HTML parser context Returns: 0, -1 in case of error. the parser context is augmented as a result of the parsing.         
        
htmlParseElement ()
void	htmlParseElement		( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt)parse an HTML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue
ctxt: an HTML parser context         
        
htmlParseEntityRef ()
const libxml2-HTMLparser.html#htmlEntityDeschtmlEntityDesc  *	htmlParseEntityRef	( libxml2-HTMLparser.html#htmlParserCtxtPtrhtmlParserCtxtPtr  ctxt, 						 const libxml2-xmlstring.html#xmlCharxmlChar  ** str)parse an HTML ENTITY references [68] EntityRef ::= '&' Name ';'
ctxt: an HTML parser context str: location to store the entity name Returns: the associated libxml2-HTMLparser.html#htmlEntityDescPtrhtmlEntityDescPtr  if found, or NULL otherwise, if non-NULL *str will have to be freed by the caller.         
        
htmlParseFile ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlParseFile		(const char * filename, 					 const char * encoding)parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
filename: the filename encoding: a free form C string describing the HTML document encoding, or NULL Returns: the resulting document tree         
        
htmlReadDoc ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlReadDoc		(const libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * URL, 					 const char * encoding, 					 int options)parse an XML in-memory document and build a tree.
cur: a pointer to a zero terminated string URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlReadFd ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlReadFd		(int fd, 					 const char * URL, 					 const char * encoding, 					 int options)parse an XML from a file descriptor and build a tree.
fd: an open file descriptor URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlReadFile ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlReadFile		(const char * filename, 					 const char * encoding, 					 int options)parse an XML file from the filesystem or the network.
filename: a file or URL encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlReadIO ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlReadIO		( libxml2-xmlIO.html#xmlInputReadCallbackxmlInputReadCallback  ioread, 					 libxml2-xmlIO.html#xmlInputCloseCallbackxmlInputCloseCallback  ioclose, 					 void * ioctx, 					 const char * URL, 					 const char * encoding, 					 int options)parse an HTML document from I/O functions and source and build a tree.
ioread: an I/O read function ioclose: an I/O close function ioctx: an I/O handler URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlReadMemory ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlReadMemory		(const char * buffer, 					 int size, 					 const char * URL, 					 const char * encoding, 					 int options)parse an XML in-memory document and build a tree.
buffer: a pointer to a char array size: the size of the array URL: the base URL to use for the document encoding: the document encoding, or NULL options: a combination of htmlParserOption(s) Returns: the resulting document tree         
        
htmlSAXParseDoc ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlSAXParseDoc		( libxml2-xmlstring.html#xmlCharxmlChar  * cur, 					 const char * encoding, 					 libxml2-HTMLparser.html#htmlSAXHandlerPtrhtmlSAXHandlerPtr  sax, 					 void * userData)Parse an HTML in-memory document. If sax is not NULL, use the SAX callbacks to handle parse events. If sax is NULL, fallback to the default DOM behavior and return a tree.
cur: a pointer to an array of libxml2-xmlstring.html#xmlCharxmlChar 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. Returns: the resulting document tree unless SAX is NULL or the document is not well formed.         
        
htmlSAXParseFile ()
libxml2-HTMLparser.html#htmlDocPtrhtmlDocPtr 	htmlSAXParseFile	(const char * filename, 					 const char * encoding, 					 libxml2-HTMLparser.html#htmlSAXHandlerPtrhtmlSAXHandlerPtr  sax, 					 void * userData)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. Returns: the resulting document tree unless SAX is NULL or the document is not well formed.         
        
htmlTagLookup ()
const libxml2-HTMLparser.html#htmlElemDeschtmlElemDesc  *	htmlTagLookup	(const libxml2-xmlstring.html#xmlCharxmlChar  * tag)Lookup the HTML tag in the ElementTable
tag: The tag name in lowercase Returns: the related libxml2-HTMLparser.html#htmlElemDescPtrhtmlElemDescPtr  or NULL if not found.         
      
    
  
