|
libxml2
|
SAX2 parser interface used to build the DOM tree. More...
Functions | |
| const xmlChar * | xmlSAX2GetPublicId (void *ctx) |
| Provides the public ID e.g. | |
| const xmlChar * | xmlSAX2GetSystemId (void *ctx) |
| Provides the system ID, basically URL or filename e.g. | |
| void | xmlSAX2SetDocumentLocator (void *ctx, xmlSAXLocator *loc) |
| Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case. | |
| int | xmlSAX2GetLineNumber (void *ctx) |
| Provide the line number of the current parsing point. | |
| int | xmlSAX2GetColumnNumber (void *ctx) |
| Provide the column number of the current parsing point. | |
| int | xmlSAX2IsStandalone (void *ctx) |
| Is this document tagged standalone ? | |
| int | xmlSAX2HasInternalSubset (void *ctx) |
| Does this document has an internal subset. | |
| int | xmlSAX2HasExternalSubset (void *ctx) |
| Does this document has an external subset. | |
| void | xmlSAX2InternalSubset (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) |
| Callback on internal subset declaration. | |
| void | xmlSAX2ExternalSubset (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) |
| Callback on external subset declaration. | |
| xmlEntity * | xmlSAX2GetEntity (void *ctx, const xmlChar *name) |
| Get an entity by name. | |
| xmlEntity * | xmlSAX2GetParameterEntity (void *ctx, const xmlChar *name) |
| Get a parameter entity by name. | |
| xmlParserInput * | xmlSAX2ResolveEntity (void *ctx, const xmlChar *publicId, const xmlChar *systemId) |
| This is only used to load DTDs. | |
| void | xmlSAX2EntityDecl (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) |
| An entity definition has been parsed. | |
| void | xmlSAX2AttributeDecl (void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumeration *tree) |
| An attribute definition has been parsed. | |
| void | xmlSAX2ElementDecl (void *ctx, const xmlChar *name, int type, xmlElementContent *content) |
| An element definition has been parsed. | |
| void | xmlSAX2NotationDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId) |
| What to do when a notation declaration has been parsed. | |
| void | xmlSAX2UnparsedEntityDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName) |
| What to do when an unparsed entity declaration is parsed. | |
| void | xmlSAX2StartDocument (void *ctx) |
| called when the document start being processed. | |
| void | xmlSAX2EndDocument (void *ctx) |
| called when the document end has been detected. | |
| void | xmlSAX2StartElement (void *ctx, const xmlChar *fullname, const xmlChar **atts) |
| Called when an opening tag has been processed. | |
| void | xmlSAX2EndElement (void *ctx, const xmlChar *name) |
| called when the end of an element has been detected. | |
| void | xmlSAX2StartElementNs (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes) |
| SAX2 callback when an element start has been detected by the parser. | |
| void | xmlSAX2EndElementNs (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI) |
| SAX2 callback when an element end has been detected by the parser. | |
| void | xmlSAX2Reference (void *ctx, const xmlChar *name) |
| called when an entity xmlSAX2Reference is detected. | |
| void | xmlSAX2Characters (void *ctx, const xmlChar *ch, int len) |
| receiving some chars from the parser. | |
| void | xmlSAX2IgnorableWhitespace (void *ctx, const xmlChar *ch, int len) |
| receiving some ignorable whitespaces from the parser. | |
| void | xmlSAX2ProcessingInstruction (void *ctx, const xmlChar *target, const xmlChar *data) |
| A processing instruction has been parsed. | |
| void | xmlSAX2Comment (void *ctx, const xmlChar *value) |
| A xmlSAX2Comment has been parsed. | |
| void | xmlSAX2CDataBlock (void *ctx, const xmlChar *value, int len) |
| called when a pcdata block has been parsed | |
| int | xmlSAXDefaultVersion (int version) |
| Has no effect. | |
| int | xmlSAXVersion (xmlSAXHandler *hdlr, int version) |
| Initialize the default XML SAX handler according to the version. | |
| void | xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, int warning) |
| Initialize the default XML SAX2 handler. | |
| void | xmlSAX2InitHtmlDefaultSAXHandler (xmlSAXHandler *hdlr) |
| Initialize the default HTML SAX2 handler. | |
| void | htmlDefaultSAXHandlerInit (void) |
| void | xmlDefaultSAXHandlerInit (void) |
| Initialize the default SAX2 handler. | |
SAX2 parser interface used to build the DOM tree.
those are the default SAX2 interfaces used by the library when building DOM tree.
| void htmlDefaultSAXHandlerInit | ( | void | ) |
| void xmlDefaultSAXHandlerInit | ( | void | ) |
Initialize the default SAX2 handler.
| void xmlSAX2AttributeDecl | ( | void * | ctx, |
| const xmlChar * | elem, | ||
| const xmlChar * | fullname, | ||
| int | type, | ||
| int | def, | ||
| const xmlChar * | defaultValue, | ||
| xmlEnumeration * | tree ) |
An attribute definition has been parsed.
| ctx | the user data (XML parser context) |
| elem | the name of the element |
| fullname | the attribute name |
| type | the attribute type |
| def | the type of default value |
| defaultValue | the attribute default value |
| tree | the tree of enumerated value set |
| void xmlSAX2CDataBlock | ( | void * | ctx, |
| const xmlChar * | value, | ||
| int | len ) |
called when a pcdata block has been parsed
| ctx | the user data (XML parser context) |
| value | The pcdata content |
| len | the block length |
| void xmlSAX2Characters | ( | void * | ctx, |
| const xmlChar * | ch, | ||
| int | len ) |
| void xmlSAX2Comment | ( | void * | ctx, |
| const xmlChar * | value ) |
A xmlSAX2Comment has been parsed.
| ctx | the user data (XML parser context) |
| value | the xmlSAX2Comment content |
| void xmlSAX2ElementDecl | ( | void * | ctx, |
| const xmlChar * | name, | ||
| int | type, | ||
| xmlElementContent * | content ) |
An element definition has been parsed.
| ctx | the user data (XML parser context) |
| name | the element name |
| type | the element type |
| content | the element value tree |
| void xmlSAX2EndDocument | ( | void * | ctx | ) |
called when the document end has been detected.
| ctx | the user data (XML parser context) |
| void xmlSAX2EndElement | ( | void * | ctx, |
| const xmlChar * | name ) |
called when the end of an element has been detected.
Used for HTML and SAX1.
| ctx | the user data (XML parser context) |
| name | The element name |
| void xmlSAX2EndElementNs | ( | void * | ctx, |
| const xmlChar * | localname, | ||
| const xmlChar * | prefix, | ||
| const xmlChar * | URI ) |
SAX2 callback when an element end has been detected by the parser.
It provides the namespace information for the element.
| ctx | the user data (XML parser context) |
| localname | the local name of the element |
| prefix | the element namespace prefix if available |
| URI | the element namespace name if available |
| void xmlSAX2EntityDecl | ( | void * | ctx, |
| const xmlChar * | name, | ||
| int | type, | ||
| const xmlChar * | publicId, | ||
| const xmlChar * | systemId, | ||
| xmlChar * | content ) |
An entity definition has been parsed.
| ctx | the user data (XML parser context) |
| name | the entity name |
| type | the entity type |
| publicId | The public ID of the entity |
| systemId | The system ID of the entity |
| content | the entity value (without processing). |
| void xmlSAX2ExternalSubset | ( | void * | ctx, |
| const xmlChar * | name, | ||
| const xmlChar * | publicId, | ||
| const xmlChar * | systemId ) |
Callback on external subset declaration.
| ctx | the user data (XML parser context) |
| name | the root element name |
| publicId | public identifier of the DTD (optional) |
| systemId | system identifier (URL) of the DTD |
| int xmlSAX2GetColumnNumber | ( | void * | ctx | ) |
Provide the column number of the current parsing point.
| ctx | the user data (XML parser context) |
Get an entity by name.
| ctx | the user data (XML parser context) |
| name | The entity name |
| int xmlSAX2GetLineNumber | ( | void * | ctx | ) |
Provide the line number of the current parsing point.
| ctx | the user data (XML parser context) |
Get a parameter entity by name.
| ctx | the user data (XML parser context) |
| name | The entity name |
| const xmlChar * xmlSAX2GetPublicId | ( | void * | ctx | ) |
Provides the public ID e.g.
"-//SGMLSOURCE//DTD DEMO//EN"
| ctx | the user data (XML parser context) |
| const xmlChar * xmlSAX2GetSystemId | ( | void * | ctx | ) |
Provides the system ID, basically URL or filename e.g.
http://www.sgmlsource.com/dtds/memo.dtd
| ctx | the user data (XML parser context) |
| int xmlSAX2HasExternalSubset | ( | void * | ctx | ) |
Does this document has an external subset.
| ctx | the user data (XML parser context) |
| int xmlSAX2HasInternalSubset | ( | void * | ctx | ) |
Does this document has an internal subset.
| ctx | the user data (XML parser context) |
| void xmlSAX2IgnorableWhitespace | ( | void * | ctx, |
| const xmlChar * | ch, | ||
| int | len ) |
receiving some ignorable whitespaces from the parser.
UNUSED: by default the DOM building will use xmlSAX2Characters
| void xmlSAX2InitDefaultSAXHandler | ( | xmlSAXHandler * | hdlr, |
| int | warning ) |
Initialize the default XML SAX2 handler.
| hdlr | the SAX handler |
| warning | flag if non-zero sets the handler warning procedure |
| void xmlSAX2InitHtmlDefaultSAXHandler | ( | xmlSAXHandler * | hdlr | ) |
Initialize the default HTML SAX2 handler.
| hdlr | the SAX handler |
| void xmlSAX2InternalSubset | ( | void * | ctx, |
| const xmlChar * | name, | ||
| const xmlChar * | publicId, | ||
| const xmlChar * | systemId ) |
Callback on internal subset declaration.
| ctx | the user data (XML parser context) |
| name | the root element name |
| publicId | public identifier of the DTD (optional) |
| systemId | system identifier (URL) of the DTD |
| int xmlSAX2IsStandalone | ( | void * | ctx | ) |
Is this document tagged standalone ?
| ctx | the user data (XML parser context) |
| void xmlSAX2NotationDecl | ( | void * | ctx, |
| const xmlChar * | name, | ||
| const xmlChar * | publicId, | ||
| const xmlChar * | systemId ) |
What to do when a notation declaration has been parsed.
| ctx | the user data (XML parser context) |
| name | The name of the notation |
| publicId | The public ID of the entity |
| systemId | The system ID of the entity |
A processing instruction has been parsed.
| ctx | the user data (XML parser context) |
| target | the target name |
| data | the PI data's |
| void xmlSAX2Reference | ( | void * | ctx, |
| const xmlChar * | name ) |
called when an entity xmlSAX2Reference is detected.
| ctx | the user data (XML parser context) |
| name | The entity name |
| xmlParserInput * xmlSAX2ResolveEntity | ( | void * | ctx, |
| const xmlChar * | publicId, | ||
| const xmlChar * | systemId ) |
This is only used to load DTDs.
The preferred way to install custom resolvers is xmlCtxtSetResourceLoader.
| ctx | the user data (XML parser context) |
| publicId | The public ID of the entity |
| systemId | The system ID (URL) of the entity |
| void xmlSAX2SetDocumentLocator | ( | void * | ctx, |
| xmlSAXLocator * | loc ) |
Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case.
| ctx | the user data (XML parser context) |
| loc | A SAX Locator |
| void xmlSAX2StartDocument | ( | void * | ctx | ) |
called when the document start being processed.
| ctx | the user data (XML parser context) |
Called when an opening tag has been processed.
Used for HTML and SAX1.
| ctx | the user data (XML parser context) |
| fullname | The element name, including namespace prefix |
| atts | An array of name/value attributes pairs, NULL terminated |
| void xmlSAX2StartElementNs | ( | void * | ctx, |
| const xmlChar * | localname, | ||
| const xmlChar * | prefix, | ||
| const xmlChar * | URI, | ||
| int | nb_namespaces, | ||
| const xmlChar ** | namespaces, | ||
| int | nb_attributes, | ||
| int | nb_defaulted, | ||
| const xmlChar ** | attributes ) |
SAX2 callback when an element start has been detected by the parser.
It provides the namespace information for the element, as well as the new namespace declarations on the element.
| ctx | the user data (XML parser context) |
| localname | the local name of the element |
| prefix | the element namespace prefix if available |
| URI | the element namespace name if available |
| nb_namespaces | number of namespace definitions on that node |
| namespaces | pointer to the array of prefix/URI pairs namespace definitions |
| nb_attributes | the number of attributes on that node |
| nb_defaulted | the number of defaulted attributes. |
| attributes | pointer to the array of (localname/prefix/URI/value/end) attribute values. |
| void xmlSAX2UnparsedEntityDecl | ( | void * | ctx, |
| const xmlChar * | name, | ||
| const xmlChar * | publicId, | ||
| const xmlChar * | systemId, | ||
| const xmlChar * | notationName ) |
What to do when an unparsed entity declaration is parsed.
| ctx | the user data (XML parser context) |
| name | The name of the entity |
| publicId | The public ID of the entity |
| systemId | The system ID of the entity |
| notationName | the name of the notation |
| int xmlSAXDefaultVersion | ( | int | version | ) |
Has no effect.
| version | the version, must be 2 |
| int xmlSAXVersion | ( | xmlSAXHandler * | hdlr, |
| int | version ) |
Initialize the default XML SAX handler according to the version.
| hdlr | the SAX handler |
| version | the version, 1 or 2 |