Annotation of XML/HTMLparser.h, revision 1.1
1.1 ! daniel 1: /*
! 2: * HTMLparser.h : inf=terface for an HTML 4.0 non-verifying parser
! 3: *
! 4: * See Copyright for the status of this software.
! 5: *
! 6: * Daniel.Veillard@w3.org
! 7: */
! 8:
! 9: #ifndef __HTML_PARSER_H__
! 10: #define __HTML_PARSER_H__
! 11: #include "parser.h"
! 12:
! 13: /*
! 14: * Most of the back-end structures from XML and HTML are shared
! 15: */
! 16: typedef xmlParserCtxt htmlParserCtxt;
! 17: typedef xmlParserCtxtPtr htmlParserCtxtPtr;
! 18: typedef xmlParserNodeInfo htmlParserNodeInfo;
! 19: typedef xmlSAXHandler htmlSAXHandler;
! 20: typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
! 21: typedef xmlParserInput htmlParserInput;
! 22: typedef xmlParserInputPtr htmlParserInputPtr;
! 23: typedef xmlDocPtr htmlDocPtr;
! 24: typedef xmlNodePtr htmlNodePtr;
! 25:
! 26: /*
! 27: * Internal description of an HTML element
! 28: */
! 29: typedef struct htmlElemDesc {
! 30: const CHAR *name; /* The tag name */
! 31: int startTag; /* Whether the start tag can be implied */
! 32: int endTag; /* Whether the end tag can be implied */
! 33: int empty; /* Is this an empty element ? */
! 34: int depr; /* Is this a deprecated element ? */
! 35: int dtd; /* 1: only in Loose DTD, 2: only Frameset one */
! 36: const char *desc; /* the description */
! 37: } htmlElemDesc, *htmlElemDescPtr;
! 38:
! 39: /*
! 40: * Internal description of an HTML entity
! 41: */
! 42: typedef struct htmlEntityDesc {
! 43: int value; /* the UNICODE value for the character */
! 44: const CHAR *name; /* The entity name */
! 45: const char *desc; /* the description */
! 46: } htmlEntityDesc, *htmlEntityDescPtr;
! 47:
! 48: /*
! 49: * There is only few public functions.
! 50: */
! 51: htmlElemDescPtr htmlTagLookup(const CHAR *tag);
! 52: htmlEntityDescPtr htmlEntityLookup(const CHAR *name);
! 53:
! 54: htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt, CHAR **str);
! 55: int htmlParseCharRef(htmlParserCtxtPtr ctxt);
! 56: void htmlParseElement(htmlParserCtxtPtr ctxt);
! 57:
! 58: htmlDocPtr htmlSAXParseDoc(CHAR *cur, const char *encoding,
! 59: htmlSAXHandlerPtr sax, void *userData);
! 60: htmlDocPtr htmlParseDoc(CHAR *cur, const char *encoding);
! 61: htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding,
! 62: htmlSAXHandlerPtr sax, void *userData);
! 63: htmlDocPtr htmlParseFile(const char *filename, const char *encoding);
! 64:
! 65: #endif /* __HTML_PARSER_H__ */
Webmaster