|
Packit |
423ecb |
|
|
Packit |
423ecb |
|
|
Packit |
423ecb |
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
|
|
Packit |
423ecb |
TD {font-family: Verdana,Arial,Helvetica}
|
|
Packit |
423ecb |
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
|
|
Packit |
423ecb |
H1 {font-family: Verdana,Arial,Helvetica}
|
|
Packit |
423ecb |
H2 {font-family: Verdana,Arial,Helvetica}
|
|
Packit |
423ecb |
H3 {font-family: Verdana,Arial,Helvetica}
|
|
Packit |
423ecb |
A:link, A:visited, A:active { text-decoration: underline }
|
|
Packit |
423ecb |
</style><style type="text/css">
|
|
Packit |
423ecb |
div.deprecated pre.programlisting {border-style: double;border-color:red}
|
|
Packit |
423ecb |
pre.programlisting {border-style: double;background: #EECFA1}
|
|
Packit |
423ecb |
</style><title>Module SAX2 from libxml2</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><center>API Menu</center> | <form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form> |
<center>API Indexes</center> | |
<center>Related links</center> | |
|
| those are the default SAX2 interfaces used by the library when building DOM tree. Table of Contentsvoid docbDefaultSAXHandlerInit (void) |
|
|
|
|
|
|
Packit |
423ecb |
void htmlDefaultSAXHandlerInit (void)
|
|
Packit |
423ecb |
void xmlDefaultSAXHandlerInit (void)
|
|
Packit |
423ecb |
void xmlSAX2AttributeDecl (void * ctx, const xmlChar * elem, const xmlChar * fullname, int type, int def, const xmlChar * defaultValue, xmlEnumerationPtr tree)
|
|
Packit |
423ecb |
void xmlSAX2CDataBlock (void * ctx, const xmlChar * value, int len)
|
|
Packit |
423ecb |
void xmlSAX2Characters (void * ctx, const xmlChar * ch, int len)
|
|
Packit |
423ecb |
void xmlSAX2Comment (void * ctx, const xmlChar * value)
|
|
Packit |
423ecb |
void xmlSAX2ElementDecl (void * ctx, const xmlChar * name, int type, xmlElementContentPtr content)
|
|
Packit |
423ecb |
void xmlSAX2EndDocument (void * ctx)
|
|
Packit |
423ecb |
void xmlSAX2EndElement (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
void xmlSAX2EndElementNs (void * ctx, const xmlChar * localname, const xmlChar * prefix, const xmlChar * URI)
|
|
Packit |
423ecb |
void xmlSAX2EntityDecl (void * ctx, const xmlChar * name, int type, const xmlChar * publicId, const xmlChar * systemId, xmlChar * content)
|
|
Packit |
423ecb |
void xmlSAX2ExternalSubset (void * ctx, const xmlChar * name, const xmlChar * ExternalID, const xmlChar * SystemID)
|
|
Packit |
423ecb |
int xmlSAX2GetColumnNumber (void * ctx)
|
|
Packit |
423ecb |
xmlEntityPtr xmlSAX2GetEntity (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
int xmlSAX2GetLineNumber (void * ctx)
|
|
Packit |
423ecb |
xmlEntityPtr xmlSAX2GetParameterEntity (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
const xmlChar * xmlSAX2GetPublicId (void * ctx)
|
|
Packit |
423ecb |
const xmlChar * xmlSAX2GetSystemId (void * ctx)
|
|
Packit |
423ecb |
int xmlSAX2HasExternalSubset (void * ctx)
|
|
Packit |
423ecb |
int xmlSAX2HasInternalSubset (void * ctx)
|
|
Packit |
423ecb |
void xmlSAX2IgnorableWhitespace (void * ctx, const xmlChar * ch, int len)
|
|
Packit |
423ecb |
void xmlSAX2InitDefaultSAXHandler (xmlSAXHandler * hdlr, int warning)
|
|
Packit |
423ecb |
void xmlSAX2InitDocbDefaultSAXHandler (xmlSAXHandler * hdlr)
|
|
Packit |
423ecb |
void xmlSAX2InitHtmlDefaultSAXHandler (xmlSAXHandler * hdlr)
|
|
Packit |
423ecb |
void xmlSAX2InternalSubset (void * ctx, const xmlChar * name, const xmlChar * ExternalID, const xmlChar * SystemID)
|
|
Packit |
423ecb |
int xmlSAX2IsStandalone (void * ctx)
|
|
Packit |
423ecb |
void xmlSAX2NotationDecl (void * ctx, const xmlChar * name, const xmlChar * publicId, const xmlChar * systemId)
|
|
Packit |
423ecb |
void xmlSAX2ProcessingInstruction (void * ctx, const xmlChar * target, const xmlChar * data)
|
|
Packit |
423ecb |
void xmlSAX2Reference (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
xmlParserInputPtr xmlSAX2ResolveEntity (void * ctx, const xmlChar * publicId, const xmlChar * systemId)
|
|
Packit |
423ecb |
void xmlSAX2SetDocumentLocator (void * ctx, xmlSAXLocatorPtr loc)
|
|
Packit |
423ecb |
void xmlSAX2StartDocument (void * ctx)
|
|
Packit |
423ecb |
void xmlSAX2StartElement (void * ctx, const xmlChar * fullname, const xmlChar ** atts)
|
|
Packit |
423ecb |
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)
|
|
Packit |
423ecb |
void xmlSAX2UnparsedEntityDecl (void * ctx, const xmlChar * name, const xmlChar * publicId, const xmlChar * systemId, const xmlChar * notationName)
|
|
Packit |
423ecb |
int xmlSAXDefaultVersion (int version)
|
|
Packit |
423ecb |
int xmlSAXVersion (xmlSAXHandler * hdlr, int version)
|
|
Packit |
423ecb |
Description
|
|
Packit |
423ecb |
Function: docbDefaultSAXHandlerInitvoid docbDefaultSAXHandlerInit (void)
|
|
Packit |
423ecb |
Initialize the default SAX handler
|
|
Packit |
423ecb |
Function: htmlDefaultSAXHandlerInitvoid htmlDefaultSAXHandlerInit (void)
|
|
Packit |
423ecb |
Initialize the default SAX handler
|
|
Packit |
423ecb |
Function: xmlDefaultSAXHandlerInitvoid xmlDefaultSAXHandlerInit (void)
|
|
Packit |
423ecb |
Initialize the default SAX2 handler
|
|
Packit |
423ecb |
Function: xmlSAX2AttributeDeclvoid xmlSAX2AttributeDecl (void * ctx, const xmlChar * elem, const xmlChar * fullname, int type, int def, const xmlChar * defaultValue, xmlEnumerationPtr tree)
|
|
Packit |
423ecb |
An attribute definition has been parsed
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>elem</tt>: | the name of the element | <tt>fullname</tt>: | the attribute name | <tt>type</tt>: | the attribute type | <tt>def</tt>: | the type of default value | <tt>defaultValue</tt>: | the attribute default value | <tt>tree</tt>: | the tree of enumerated value set |
Function: xmlSAX2CDataBlockvoid xmlSAX2CDataBlock (void * ctx, const xmlChar * value, int len)
|
|
Packit |
423ecb |
called when a pcdata block has been parsed
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>value</tt>: | The pcdata content | <tt>len</tt>: | the block length |
Function: xmlSAX2Charactersvoid xmlSAX2Characters (void * ctx, const xmlChar * ch, int len)
|
|
Packit |
423ecb |
receiving some chars from the parser.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>ch</tt>: | a xmlChar string | <tt>len</tt>: | the number of xmlChar |
Function: xmlSAX2Commentvoid xmlSAX2Comment (void * ctx, const xmlChar * value)
|
|
Packit |
423ecb |
A xmlSAX2Comment has been parsed.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>value</tt>: | the xmlSAX2Comment content |
Function: xmlSAX2ElementDeclvoid xmlSAX2ElementDecl (void * ctx, const xmlChar * name, int type, xmlElementContentPtr content)
|
|
Packit |
423ecb |
An element definition has been parsed
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | the element name | <tt>type</tt>: | the element type | <tt>content</tt>: | the element value tree |
Function: xmlSAX2EndDocumentvoid xmlSAX2EndDocument (void * ctx)
|
|
Packit |
423ecb |
called when the document end has been detected.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) |
Function: xmlSAX2EndElementvoid xmlSAX2EndElement (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
called when the end of an element has been detected.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | The element name |
Function: xmlSAX2EndElementNsvoid xmlSAX2EndElementNs (void * ctx, const xmlChar * localname, const xmlChar * prefix, const xmlChar * URI)
|
|
Packit |
423ecb |
SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>localname</tt>: | the local name of the element | <tt>prefix</tt>: | the element namespace prefix if available | <tt>URI</tt>: | the element namespace name if available |
Function: xmlSAX2EntityDeclvoid xmlSAX2EntityDecl (void * ctx, const xmlChar * name, int type, const xmlChar * publicId, const xmlChar * systemId, xmlChar * content)
|
|
Packit |
423ecb |
An entity definition has been parsed
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | the entity name | <tt>type</tt>: | the entity type | <tt>publicId</tt>: | The public ID of the entity | <tt>systemId</tt>: | The system ID of the entity | <tt>content</tt>: | the entity value (without processing). |
Function: xmlSAX2ExternalSubsetvoid xmlSAX2ExternalSubset (void * ctx, const xmlChar * name, const xmlChar * ExternalID, const xmlChar * SystemID)
|
|
Packit |
423ecb |
Callback on external subset declaration.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | the root element name | <tt>ExternalID</tt>: | the external ID | <tt>SystemID</tt>: | the SYSTEM ID (e.g. filename or URL) |
Function: xmlSAX2GetColumnNumberint xmlSAX2GetColumnNumber (void * ctx)
|
|
Packit |
423ecb |
Provide the column number of the current parsing point.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | an int |
Function: xmlSAX2GetEntityxmlEntityPtr xmlSAX2GetEntity (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
Get an entity by name
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | The entity name | <tt>Returns</tt>: | the xmlEntityPtr if found. |
Function: xmlSAX2GetLineNumberint xmlSAX2GetLineNumber (void * ctx)
|
|
Packit |
423ecb |
Provide the line number of the current parsing point.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | an int |
Function: xmlSAX2GetParameterEntityxmlEntityPtr xmlSAX2GetParameterEntity (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
Get a parameter entity by name
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | The entity name | <tt>Returns</tt>: | the xmlEntityPtr if found. |
Function: xmlSAX2GetPublicIdconst xmlChar * xmlSAX2GetPublicId (void * ctx)
|
|
Packit |
423ecb |
Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | a xmlChar * |
Function: xmlSAX2GetSystemIdconst xmlChar * xmlSAX2GetSystemId (void * ctx)
|
|
Packit |
423ecb |
Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | a xmlChar * |
Function: xmlSAX2HasExternalSubsetint xmlSAX2HasExternalSubset (void * ctx)
|
|
Packit |
423ecb |
Does this document has an external subset
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | 1 if true |
Function: xmlSAX2HasInternalSubsetint xmlSAX2HasInternalSubset (void * ctx)
|
|
Packit |
423ecb |
Does this document has an internal subset
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | 1 if true |
Function: xmlSAX2IgnorableWhitespacevoid xmlSAX2IgnorableWhitespace (void * ctx, const xmlChar * ch, int len)
|
|
Packit |
423ecb |
receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use xmlSAX2Characters
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>ch</tt>: | a xmlChar string | <tt>len</tt>: | the number of xmlChar |
Function: xmlSAX2InitDefaultSAXHandlervoid xmlSAX2InitDefaultSAXHandler (xmlSAXHandler * hdlr, int warning)
|
|
Packit |
423ecb |
Initialize the default XML SAX2 handler
|
|
Packit |
423ecb |
<tt>hdlr</tt>: | the SAX handler | <tt>warning</tt>: | flag if non-zero sets the handler warning procedure |
Function: xmlSAX2InitDocbDefaultSAXHandlervoid xmlSAX2InitDocbDefaultSAXHandler (xmlSAXHandler * hdlr)
|
|
Packit |
423ecb |
Initialize the default DocBook SAX2 handler
|
|
Packit |
423ecb |
<tt>hdlr</tt>: | the SAX handler |
Function: xmlSAX2InitHtmlDefaultSAXHandlervoid xmlSAX2InitHtmlDefaultSAXHandler (xmlSAXHandler * hdlr)
|
|
Packit |
423ecb |
Initialize the default HTML SAX2 handler
|
|
Packit |
423ecb |
<tt>hdlr</tt>: | the SAX handler |
Function: xmlSAX2InternalSubsetvoid xmlSAX2InternalSubset (void * ctx, const xmlChar * name, const xmlChar * ExternalID, const xmlChar * SystemID)
|
|
Packit |
423ecb |
Callback on internal subset declaration.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | the root element name | <tt>ExternalID</tt>: | the external ID | <tt>SystemID</tt>: | the SYSTEM ID (e.g. filename or URL) |
Function: xmlSAX2IsStandaloneint xmlSAX2IsStandalone (void * ctx)
|
|
Packit |
423ecb |
Is this document tagged standalone ?
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>Returns</tt>: | 1 if true |
Function: xmlSAX2NotationDeclvoid xmlSAX2NotationDecl (void * ctx, const xmlChar * name, const xmlChar * publicId, const xmlChar * systemId)
|
|
Packit |
423ecb |
What to do when a notation declaration has been parsed.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | The name of the notation | <tt>publicId</tt>: | The public ID of the entity | <tt>systemId</tt>: | The system ID of the entity |
Function: xmlSAX2ProcessingInstructionvoid xmlSAX2ProcessingInstruction (void * ctx, const xmlChar * target, const xmlChar * data)
|
|
Packit |
423ecb |
A processing instruction has been parsed.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>target</tt>: | the target name | <tt>data</tt>: | the PI data's |
Function: xmlSAX2Referencevoid xmlSAX2Reference (void * ctx, const xmlChar * name)
|
|
Packit |
423ecb |
called when an entity xmlSAX2Reference is detected.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | The entity name |
Function: xmlSAX2ResolveEntityxmlParserInputPtr xmlSAX2ResolveEntity (void * ctx, const xmlChar * publicId, const xmlChar * systemId)
|
|
Packit |
423ecb |
The entity loader, to control the loading of external entities, the application can either: - override this xmlSAX2ResolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>publicId</tt>: | The public ID of the entity | <tt>systemId</tt>: | The system ID of the entity | <tt>Returns</tt>: | the xmlParserInputPtr if inlined or NULL for DOM behaviour. |
Function: xmlSAX2SetDocumentLocatorvoid xmlSAX2SetDocumentLocator (void * ctx, xmlSAXLocatorPtr loc)
|
|
Packit |
423ecb |
Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>loc</tt>: | A SAX Locator |
Function: xmlSAX2StartDocumentvoid xmlSAX2StartDocument (void * ctx)
|
|
Packit |
423ecb |
called when the document start being processed.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) |
Function: xmlSAX2StartElementvoid xmlSAX2StartElement (void * ctx, const xmlChar * fullname, const xmlChar ** atts)
|
|
Packit |
423ecb |
called when an opening tag has been processed.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>fullname</tt>: | The element name, including namespace prefix | <tt>atts</tt>: | An array of name/value attributes pairs, NULL terminated |
Function: xmlSAX2StartElementNsvoid 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)
|
|
Packit |
423ecb |
SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>localname</tt>: | the local name of the element | <tt>prefix</tt>: | the element namespace prefix if available | <tt>URI</tt>: | the element namespace name if available | <tt>nb_namespaces</tt>: | number of namespace definitions on that node | <tt>namespaces</tt>: | pointer to the array of prefix/URI pairs namespace definitions | <tt>nb_attributes</tt>: | the number of attributes on that node | <tt>nb_defaulted</tt>: | the number of defaulted attributes. | <tt>attributes</tt>: | pointer to the array of (localname/prefix/URI/value/end) attribute values. |
Function: xmlSAX2UnparsedEntityDeclvoid xmlSAX2UnparsedEntityDecl (void * ctx, const xmlChar * name, const xmlChar * publicId, const xmlChar * systemId, const xmlChar * notationName)
|
|
Packit |
423ecb |
What to do when an unparsed entity declaration is parsed
|
|
Packit |
423ecb |
<tt>ctx</tt>: | the user data (XML parser context) | <tt>name</tt>: | The name of the entity | <tt>publicId</tt>: | The public ID of the entity | <tt>systemId</tt>: | The system ID of the entity | <tt>notationName</tt>: | the name of the notation |
Function: xmlSAXDefaultVersionint xmlSAXDefaultVersion (int version)
|
|
Packit |
423ecb |
Set the default version of SAX used globally by the library. By default, during initialization the default is set to 2. Note that it is generally a better coding style to use xmlSAXVersion() to set up the version explicitly for a given parsing context.
|
|
Packit |
423ecb |
<tt>version</tt>: | the version, 1 or 2 | <tt>Returns</tt>: | the previous value in case of success and -1 in case of error. |
Function: xmlSAXVersionint xmlSAXVersion (xmlSAXHandler * hdlr, int version)
|
|
Packit |
423ecb |
Initialize the default XML SAX handler according to the version
|
|
Packit |
423ecb |
<tt>hdlr</tt>: | the SAX handler | <tt>version</tt>: | the version, 1 or 2 | <tt>Returns</tt>: | 0 in case of success and -1 in case of error. |
Daniel Veillard </body></html>
|