deps/src/libxml2-2.9.1/doc/devhelp/libxml2-SAX.html
| | | | | libxml2 Reference Manual |
SAX - Old SAX version 1 handler, deprecated
DEPRECATED set of SAX version 1 interfaces used to build the DOM tree.
WARNING: this module is deprecated !
Author(s): Daniel Veillard
void[comment](#comment)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value);
int[checkNamespace](#checkNamespace)(void * ctx,
[xmlChar](libxml2-xmlstring.html#xmlChar)* namespace);
int[getColumnNumber](#getColumnNumber)(void * ctx);
void[entityDecl](#entityDecl)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
[xmlChar](libxml2-xmlstring.html#xmlChar)* content);
void[attribute](#attribute)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value);[xmlNsPtr](libxml2-tree.html#xmlNsPtr)[getNamespace](#getNamespace)(void * ctx);
void[setDocumentLocator](#setDocumentLocator)(void * ctx,
[xmlSAXLocatorPtr](libxml2-tree.html#xmlSAXLocatorPtr)loc);
void[initxmlDefaultSAXHandler](#initxmlDefaultSAXHandler)([xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* hdlr,
int warning);
void[ignorableWhitespace](#ignorableWhitespace)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len);
int[hasExternalSubset](#hasExternalSubset)(void * ctx);
void[unparsedEntityDecl](#unparsedEntityDecl)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* notationName);
void[globalNamespace](#globalNamespace)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix);
int[hasInternalSubset](#hasInternalSubset)(void * ctx);
void[reference](#reference)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
void[notationDecl](#notationDecl)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId);
const[xmlChar](libxml2-xmlstring.html#xmlChar)*[getSystemId](#getSystemId)(void * ctx);
void[externalSubset](#externalSubset)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID);[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)[resolveEntity](#resolveEntity)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId);
void[startDocument](#startDocument)(void * ctx);
void[setNamespace](#setNamespace)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
void[cdataBlock](#cdataBlock)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value,
int len);
const[xmlChar](libxml2-xmlstring.html#xmlChar)*[getPublicId](#getPublicId)(void * ctx);
void[inithtmlDefaultSAXHandler](#inithtmlDefaultSAXHandler)([xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* hdlr);
void[processingInstruction](#processingInstruction)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* target,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* data);
void[endElement](#endElement)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
void[namespaceDecl](#namespaceDecl)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix);
void[initdocbDefaultSAXHandler](#initdocbDefaultSAXHandler)([xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* hdlr);[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)[getEntity](#getEntity)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
void[characters](#characters)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len);
void[elementDecl](#elementDecl)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
[xmlElementContentPtr](libxml2-tree.html#xmlElementContentPtr)content);
void[startElement](#startElement)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** atts);[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)[getParameterEntity](#getParameterEntity)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name);
void[attributeDecl](#attributeDecl)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* elem,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
int type,
int def,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* defaultValue,
[xmlEnumerationPtr](libxml2-tree.html#xmlEnumerationPtr)tree);
int[isStandalone](#isStandalone)(void * ctx);
void[internalSubset](#internalSubset)(void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID);
void[endDocument](#endDocument)(void * ctx);
int[getLineNumber](#getLineNumber)(void * ctx);
void attribute (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value)
Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element. DEPRECATED: use xmlSAX2Attribute()
| ctx: | the user data (XML parser context) | | fullname: | The attribute name, including namespace prefix | | value: | The attribute value |
void attributeDecl (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* elem,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
int type,
int def,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* defaultValue,
[xmlEnumerationPtr](libxml2-tree.html#xmlEnumerationPtr)tree)
An attribute definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()
| 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 cdataBlock (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value,
int len)
called when a pcdata block has been parsed DEPRECATED: use xmlSAX2CDataBlock()
| ctx: | the user data (XML parser context) | | value: | The pcdata content | | len: | the block length |
void characters (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len)
receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()
| ctx: | the user data (XML parser context) | | ch: | a xmlChar string | | len: | the number of xmlChar |
int checkNamespace (void * ctx,
[xmlChar](libxml2-xmlstring.html#xmlChar)* namespace)
Check that the current element namespace is the same as the one read upon parsing. DEPRECATED
| ctx: | the user data (XML parser context) | | namespace: | the namespace to check against | | Returns: | 1 if true 0 otherwise |
void comment (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* value)
A comment has been parsed. DEPRECATED: use xmlSAX2Comment()
| ctx: | the user data (XML parser context) | | value: | the comment content |
void elementDecl (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
[xmlElementContentPtr](libxml2-tree.html#xmlElementContentPtr)content)
An element definition has been parsed DEPRECATED: use xmlSAX2ElementDecl()
| ctx: | the user data (XML parser context) | | name: | the element name | | type: | the element type | | content: | the element value tree |
void endDocument (void * ctx)
called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()
| ctx: | the user data (XML parser context) |
void endElement (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)
called when the end of an element has been detected. DEPRECATED: use xmlSAX2EndElement()
| ctx: | the user data (XML parser context) | | name: | The element name |
void entityDecl (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
int type,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
[xmlChar](libxml2-xmlstring.html#xmlChar)* content)
An entity definition has been parsed DEPRECATED: use xmlSAX2EntityDecl()
| 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 externalSubset (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID)
Callback on external subset declaration. DEPRECATED: use xmlSAX2ExternalSubset()
| ctx: | the user data (XML parser context) | | name: | the root element name | | ExternalID: | the external ID | | SystemID: | the SYSTEM ID (e.g. filename or URL) |
int getColumnNumber (void * ctx)
Provide the column number of the current parsing point. DEPRECATED: use xmlSAX2GetColumnNumber()
| ctx: | the user data (XML parser context) | | Returns: | an int |
[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)getEntity (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)
Get an entity by name DEPRECATED: use xmlSAX2GetEntity()
| ctx: | the user data (XML parser context) | | name: | The entity name | | Returns: | the xmlEntityPtr if found. |
int getLineNumber (void * ctx)
Provide the line number of the current parsing point. DEPRECATED: use xmlSAX2GetLineNumber()
| ctx: | the user data (XML parser context) | | Returns: | an int |
[xmlNsPtr](libxml2-tree.html#xmlNsPtr)getNamespace (void * ctx)
Get the current element namespace. DEPRECATED
| ctx: | the user data (XML parser context) | | Returns: | the xmlNsPtr or NULL if none |
[xmlEntityPtr](libxml2-tree.html#xmlEntityPtr)getParameterEntity (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)
Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()
| ctx: | the user data (XML parser context) | | name: | The entity name | | Returns: | the xmlEntityPtr if found. |
const[xmlChar](libxml2-xmlstring.html#xmlChar)* getPublicId (void * ctx)
Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" DEPRECATED: use xmlSAX2GetPublicId()
| ctx: | the user data (XML parser context) | | Returns: | a xmlChar * |
const[xmlChar](libxml2-xmlstring.html#xmlChar)* getSystemId (void * ctx)
Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd DEPRECATED: use xmlSAX2GetSystemId()
| ctx: | the user data (XML parser context) | | Returns: | a xmlChar * |
void globalNamespace (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix)
An old global namespace has been parsed. DEPRECATED
| ctx: | the user data (XML parser context) | | href: | the namespace associated URN | | prefix: | the namespace prefix |
int hasExternalSubset (void * ctx)
Does this document has an external subset DEPRECATED: use xmlSAX2HasExternalSubset()
| ctx: | the user data (XML parser context) | | Returns: | 1 if true |
int hasInternalSubset (void * ctx)
Does this document has an internal subset DEPRECATED: use xmlSAX2HasInternalSubset()
| ctx: | the user data (XML parser context) | | Returns: | 1 if true |
void ignorableWhitespace (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ch,
int len)
receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use characters DEPRECATED: use xmlSAX2IgnorableWhitespace()
| ctx: | the user data (XML parser context) | | ch: | a xmlChar string | | len: | the number of xmlChar |
void initdocbDefaultSAXHandler ([xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* hdlr)
Initialize the default DocBook SAX version 1 handler DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
| hdlr: | the SAX handler |
void inithtmlDefaultSAXHandler ([xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* hdlr)
Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks
| hdlr: | the SAX handler |
void initxmlDefaultSAXHandler ([xmlSAXHandlerV1](libxml2-parser.html#xmlSAXHandlerV1)* hdlr,
int warning)
Initialize the default XML SAX version 1 handler DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks
| hdlr: | the SAX handler | | warning: | flag if non-zero sets the handler warning procedure |
void internalSubset (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* SystemID)
Callback on internal subset declaration. DEPRECATED: use xmlSAX2InternalSubset()
| ctx: | the user data (XML parser context) | | name: | the root element name | | ExternalID: | the external ID | | SystemID: | the SYSTEM ID (e.g. filename or URL) |
int isStandalone (void * ctx)
Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()
| ctx: | the user data (XML parser context) | | Returns: | 1 if true |
void namespaceDecl (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* prefix)
A namespace has been parsed. DEPRECATED
| ctx: | the user data (XML parser context) | | href: | the namespace associated URN | | prefix: | the namespace prefix |
void notationDecl (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId)
What to do when a notation declaration has been parsed. DEPRECATED: use xmlSAX2NotationDecl()
| 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 |
void processingInstruction (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* target,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* data)
A processing instruction has been parsed. DEPRECATED: use xmlSAX2ProcessingInstruction()
| ctx: | the user data (XML parser context) | | target: | the target name | | data: | the PI data's |
void reference (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)
called when an entity reference is detected. DEPRECATED: use xmlSAX2Reference()
| ctx: | the user data (XML parser context) | | name: | The entity name |
[xmlParserInputPtr](libxml2-tree.html#xmlParserInputPtr)resolveEntity (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId)
The entity loader, to control the loading of external entities, the application can either: - override this resolveEntity() callback in the SAX block - or better use the xmlSetExternalEntityLoader() function to set up it's own entity resolution routine DEPRECATED: use xmlSAX2ResolveEntity()
| ctx: | the user data (XML parser context) | | publicId: | The public ID of the entity | | systemId: | The system ID of the entity | | Returns: | the xmlParserInputPtr if inlined or NULL for DOM behaviour. |
void setDocumentLocator (void * ctx,
[xmlSAXLocatorPtr](libxml2-tree.html#xmlSAXLocatorPtr)loc)
Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case. DEPRECATED
| ctx: | the user data (XML parser context) | | loc: | A SAX Locator |
void setNamespace (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name)
Set the current element namespace. DEPRECATED
| ctx: | the user data (XML parser context) | | name: | the namespace prefix |
void startDocument (void * ctx)
called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()
| ctx: | the user data (XML parser context) |
void startElement (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* fullname,
const[xmlChar](libxml2-xmlstring.html#xmlChar)** atts)
called when an opening tag has been processed. DEPRECATED: use xmlSAX2StartElement()
| 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 unparsedEntityDecl (void * ctx,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* publicId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* systemId,
const[xmlChar](libxml2-xmlstring.html#xmlChar)* notationName)
What to do when an unparsed entity declaration is parsed DEPRECATED: use xmlSAX2UnparsedEntityDecl()
| 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 |