libxml2_sax2.h File Reference

xmlSAX2GetPublicId ( void * )

XMLPUBFUN const xmlChar *XMLCALLxmlSAX2GetPublicId(void *ctx)

xmlSAX2GetSystemId ( void * )

XMLPUBFUN const xmlChar *XMLCALLxmlSAX2GetSystemId(void *ctx)

xmlSAX2GetSystemId: Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd

Returns a xmlChar *

Parameters
ctxthe user data (XML parser context)

xmlSAX2SetDocumentLocator ( void *, xmlSAXLocatorPtr )

XMLPUBFUN void XMLCALLxmlSAX2SetDocumentLocator(void *ctx,
xmlSAXLocatorPtrloc
)

xmlSAX2GetLineNumber ( void * )

XMLPUBFUN int XMLCALLxmlSAX2GetLineNumber(void *ctx)

xmlSAX2GetLineNumber: Provide the line number of the current parsing point.

Returns an int

Parameters
ctxthe user data (XML parser context)

xmlSAX2GetColumnNumber ( void * )

XMLPUBFUN int XMLCALLxmlSAX2GetColumnNumber(void *ctx)

xmlSAX2GetColumnNumber: Provide the column number of the current parsing point.

Returns an int

Parameters
ctxthe user data (XML parser context)

xmlSAX2IsStandalone ( void * )

XMLPUBFUN int XMLCALLxmlSAX2IsStandalone(void *ctx)

xmlSAX2IsStandalone: Is this document tagged standalone ?

Returns 1 if true

Parameters
ctxthe user data (XML parser context)

xmlSAX2HasInternalSubset ( void * )

XMLPUBFUN int XMLCALLxmlSAX2HasInternalSubset(void *ctx)

xmlSAX2HasInternalSubset: Does this document has an internal subset

Returns 1 if true

Parameters
ctxthe user data (XML parser context)

xmlSAX2HasExternalSubset ( void * )

XMLPUBFUN int XMLCALLxmlSAX2HasExternalSubset(void *ctx)

xmlSAX2HasExternalSubset: Does this document has an external subset

Returns 1 if true

Parameters
ctxthe user data (XML parser context)

xmlSAX2InternalSubset ( void *, const xmlChar *, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2InternalSubset(void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID
)

xmlSAX2InternalSubset: Callback on internal subset declaration.

Parameters
ctxthe user data (XML parser context)
namethe root element name
ExternalIDthe external ID
SystemIDthe SYSTEM ID (e.g. filename or URL)

xmlSAX2ExternalSubset ( void *, const xmlChar *, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2ExternalSubset(void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID
)

xmlSAX2ExternalSubset: Callback on external subset declaration.

Parameters
ctxthe user data (XML parser context)
namethe root element name
ExternalIDthe external ID
SystemIDthe SYSTEM ID (e.g. filename or URL)

xmlSAX2GetEntity ( void *, const xmlChar * )

XMLPUBFUN xmlEntityPtr XMLCALLxmlSAX2GetEntity(void *ctx,
const xmlChar *name
)

xmlSAX2GetEntity: Get an entity by name

Returns the xmlEntityPtr if found.

Parameters
ctxthe user data (XML parser context)
nameThe entity name

xmlSAX2GetParameterEntity ( void *, const xmlChar * )

XMLPUBFUN xmlEntityPtr XMLCALLxmlSAX2GetParameterEntity(void *ctx,
const xmlChar *name
)

xmlSAX2GetParameterEntity: Get a parameter entity by name

Returns the xmlEntityPtr if found.

Parameters
ctxthe user data (XML parser context)
nameThe entity name

xmlSAX2ResolveEntity ( void *, const xmlChar *, const xmlChar * )

XMLPUBFUN xmlParserInputPtr XMLCALLxmlSAX2ResolveEntity(void *ctx,
const xmlChar *publicId,
const xmlChar *systemId
)
xmlSAX2ResolveEntity: The entity loader, to control the loading of external entities, the application can either:

Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.

Parameters
ctxthe user data (XML parser context)
publicIdThe public ID of the entity
systemIdThe system ID of the entity

xmlSAX2EntityDecl ( void *, const xmlChar *, int, const xmlChar *, const xmlChar *, xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2EntityDecl(void *ctx,
const xmlChar *name,
inttype,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content
)

xmlSAX2EntityDecl: An entity definition has been parsed

Parameters
ctxthe user data (XML parser context)
namethe entity name
typethe entity type
publicIdThe public ID of the entity
systemIdThe system ID of the entity
contentthe entity value (without processing).

xmlSAX2AttributeDecl ( void *, const xmlChar *, const xmlChar *, int, int, const xmlChar *, xmlEnumerationPtr )

XMLPUBFUN void XMLCALLxmlSAX2AttributeDecl(void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
inttype,
intdef,
const xmlChar *defaultValue,
xmlEnumerationPtrtree
)

xmlSAX2AttributeDecl: An attribute definition has been parsed

Parameters
ctxthe user data (XML parser context)
elemthe name of the element
fullnamethe attribute name
typethe attribute type
defthe type of default value
defaultValuethe attribute default value
treethe tree of enumerated value set

xmlSAX2ElementDecl ( void *, const xmlChar *, int, xmlElementContentPtr )

XMLPUBFUN void XMLCALLxmlSAX2ElementDecl(void *ctx,
const xmlChar *name,
inttype,
xmlElementContentPtrcontent
)

xmlSAX2ElementDecl: An element definition has been parsed

Parameters
ctxthe user data (XML parser context)
namethe element name
typethe element type
contentthe element value tree

xmlSAX2NotationDecl ( void *, const xmlChar *, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2NotationDecl(void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId
)

xmlSAX2NotationDecl: What to do when a notation declaration has been parsed.

Parameters
ctxthe user data (XML parser context)
nameThe name of the notation
publicIdThe public ID of the entity
systemIdThe system ID of the entity

xmlSAX2UnparsedEntityDecl ( void *, const xmlChar *, const xmlChar *, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2UnparsedEntityDecl(void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName
)

xmlSAX2UnparsedEntityDecl: What to do when an unparsed entity declaration is parsed

Parameters
ctxthe user data (XML parser context)
nameThe name of the entity
publicIdThe public ID of the entity
systemIdThe system ID of the entity
notationNamethe name of the notation

xmlSAX2StartDocument ( void * )

XMLPUBFUN void XMLCALLxmlSAX2StartDocument(void *ctx)

xmlSAX2StartDocument: called when the document start being processed.

OOM: possible --> check OOM flag

Parameters
ctxthe user data (XML parser context)

xmlSAX2EndDocument ( void * )

XMLPUBFUN void XMLCALLxmlSAX2EndDocument(void *ctx)

xmlSAX2EndDocument: called when the document end has been detected.

Parameters
ctxthe user data (XML parser context)

xmlSAX2StartElement ( void *, const xmlChar *, const xmlChar ** )

XMLPUBFUN void XMLCALLxmlSAX2StartElement(void *ctx,
const xmlChar *fullname,
const xmlChar **atts
)

xmlSAX2EndElement ( void *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2EndElement(void *ctx,
const xmlChar *name
)

xmlSAX2StartElementNs ( void *, const xmlChar *, const xmlChar *, const xmlChar *, int, const xmlChar **, int, int, const xmlChar ** )

XMLPUBFUN void XMLCALLxmlSAX2StartElementNs(void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI,
intnb_namespaces,
const xmlChar **namespaces,
intnb_attributes,
intnb_defaulted,
const xmlChar **attributes
)

xmlSAX2StartElementNs: 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.

Parameters
ctxthe user data (XML parser context)
localnamethe local name of the element
prefixthe element namespace prefix if available
URIthe element namespace name if available
nb_namespacesnumber of namespace definitions on that node
namespacespointer to the array of prefix/URI pairs namespace definitions
nb_attributesthe number of attributes on that node
nb_defaultedthe number of defaulted attributes.
attributespointer to the array of (localname/prefix/URI/value/end) attribute values.

xmlSAX2EndElementNs ( void *, const xmlChar *, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2EndElementNs(void *ctx,
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI
)

xmlSAX2Reference ( void *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2Reference(void *ctx,
const xmlChar *name
)

xmlSAX2Reference: called when an entity xmlSAX2Reference is detected.

Parameters
ctxthe user data (XML parser context)
nameThe entity name

xmlSAX2Characters ( void *, const xmlChar *, int )

XMLPUBFUN void XMLCALLxmlSAX2Characters(void *ctx,
const xmlChar *ch,
intlen
)

xmlSAX2Characters: receiving some chars from the parser.

Parameters
ctxthe user data (XML parser context)
cha xmlChar string
lenthe number of xmlChar

xmlSAX2IgnorableWhitespace ( void *, const xmlChar *, int )

XMLPUBFUN void XMLCALLxmlSAX2IgnorableWhitespace(void *ctx,
const xmlChar *ch,
intlen
)

xmlSAX2ProcessingInstruction ( void *, const xmlChar *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2ProcessingInstruction(void *ctx,
const xmlChar *target,
const xmlChar *data
)

xmlSAX2ProcessingInstruction: A processing instruction has been parsed.

Parameters
ctxthe user data (XML parser context)
targetthe target name
datathe PI data's

xmlSAX2Comment ( void *, const xmlChar * )

XMLPUBFUN void XMLCALLxmlSAX2Comment(void *ctx,
const xmlChar *value
)

xmlSAX2Comment: A xmlSAX2Comment has been parsed.

Parameters
ctxthe user data (XML parser context)
valuethe xmlSAX2Comment content

xmlSAX2CDataBlock ( void *, const xmlChar *, int )

XMLPUBFUN void XMLCALLxmlSAX2CDataBlock(void *ctx,
const xmlChar *value,
intlen
)

xmlSAX2CDataBlock: called when a pcdata block has been parsed

Parameters
ctxthe user data (XML parser context)
valueThe pcdata content
lenthe block length

xmlSAXDefaultVersion ( int )

XMLPUBFUN int XMLCALLxmlSAXDefaultVersion(intversion)

xmlSAXVersion ( xmlSAXHandler *, int )

XMLPUBFUN int XMLCALLxmlSAXVersion(xmlSAXHandler *hdlr,
intversion
)

xmlSAXVersion: Initialize the default XML SAX handler according to the version

Returns 0 in case of success and -1 in case of error.

OOM: never

Parameters
hdlrthe SAX handler
versionthe version, 1 or 2

xmlSAX2InitDefaultSAXHandler ( xmlSAXHandler *, int )

XMLPUBFUN void XMLCALLxmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr,
intwarning
)

xmlSAX2InitDefaultSAXHandler: Initialize the default XML SAX2 handler

Parameters
hdlrthe SAX handler
warningflag if non-zero sets the handler warning procedure

xmlDefaultSAXHandlerInit ( void )

XMLPUBFUN void XMLCALLxmlDefaultSAXHandlerInit(void)

xmlDefaultSAXHandlerInit:

Initialize the default SAX2 handler

OOM: never

htmlDefaultSAXHandlerInit ( void )

XMLPUBFUN void XMLCALLhtmlDefaultSAXHandlerInit(void)

docbDefaultSAXHandlerInit ( void )

XMLPUBFUN void XMLCALLdocbDefaultSAXHandlerInit(void)