http://swpat.ffii.org/
Action against software patents
http://www.gnome.org/
Gnome2 Logo
http://www.w3.org/Status
W3C Logo
http://www.redhat.com/
Red Hat Logo
http://xmlsoft.org/
Made with Libxml2 Logo
Module SAX from libxml2
API Menu
../index.html
Main Menu
../docs.html
Developer Menu
../examples/index.html
Code Examples
index.html
API Menu
libxml-parser.html
Parser API
libxml-tree.html
Tree API
libxml-xmlreader.html
Reader API
../guidelines.html
XML Guidelines
../ChangeLog.html
ChangeLog
API Indexes
../APIchunk0.html
Alphabetic
../APIconstructors.html
Constructors
../APIfunctions.html
Functions/Types
../APIfiles.html
Modules
../APIsymbols.html
Symbols
Related links
http://mail.gnome.org/archives/xml/
Mail archive
http://xmlsoft.org/XSLT/
XSLT libxslt
http://phd.cs.unibo.it/gdome2/
DOM gdome2
http://www.aleksey.com/xmlsec/
XML-DSig xmlsec
ftp://xmlsoft.org/
FTP
http://www.zlatkovic.com/projects/libxml/
Windows binaries
http://www.blastwave.org/packages.php/libxml2
Solaris binaries
http://www.explain.com.au/oss/libxml2xslt.html
MacOsX binaries
http://libxmlplusplus.sourceforge.net/
C++ bindings
http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4
PHP bindings
http://sourceforge.net/projects/libxml2-pas/
Pascal bindings
http://rubyforge.org/projects/xml-tools/
Ruby bindings
http://tclxml.sourceforge.net/
Tcl bindings
http://bugzilla.gnome.org/buglist.cgi?product=libxml2
Bug Tracker
libxml-HTMLtree.html
Prev
libxml-HTMLtree.html
HTMLtree
index.html
Up
index.html
API documentation
../index.html
Home
../index.html
The XML C parser and toolkit of Gnome
libxml-SAX2.html
SAX2
libxml-SAX2.html
Next
This module is deprecated
DEPRECATED set of SAX version 1 interfaces used to build the DOM tree.
Table of Contents
void
#comment
comment
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value)
int
#checkNamespace
checkNamespace
(void * ctx,
libxml-xmlstring.html#xmlChar
xmlChar
* namespace)
int
#getColumnNumber
getColumnNumber
(void * ctx)
void
#entityDecl
entityDecl
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
int type,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* systemId,
libxml-xmlstring.html#xmlChar
xmlChar
* content)
void
#attribute
attribute
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* fullname,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value)
libxml-tree.html#xmlNsPtr
xmlNsPtr
#getNamespace
getNamespace
(void * ctx)
void
#setDocumentLocator
setDocumentLocator
(void * ctx,
libxml-tree.html#xmlSAXLocatorPtr
xmlSAXLocatorPtr
loc)
void
#initxmlDefaultSAXHandler
initxmlDefaultSAXHandler
(
libxml-parser.html#xmlSAXHandlerV1
xmlSAXHandlerV1
* hdlr,
int warning)
void
#ignorableWhitespace
ignorableWhitespace
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ch,
int len)
int
#hasExternalSubset
hasExternalSubset
(void * ctx)
void
#unparsedEntityDecl
unparsedEntityDecl
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* systemId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* notationName)
void
#globalNamespace
globalNamespace
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* href,
const
libxml-xmlstring.html#xmlChar
xmlChar
* prefix)
int
#hasInternalSubset
hasInternalSubset
(void * ctx)
void
#reference
reference
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
void
#notationDecl
notationDecl
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* systemId)
const
libxml-xmlstring.html#xmlChar
xmlChar
*
#getSystemId
getSystemId
(void * ctx)
void
#externalSubset
externalSubset
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ExternalID,
const
libxml-xmlstring.html#xmlChar
xmlChar
* SystemID)
libxml-tree.html#xmlParserInputPtr
xmlParserInputPtr
#resolveEntity
resolveEntity
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* systemId)
void
#startDocument
startDocument
(void * ctx)
void
#setNamespace
setNamespace
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
void
#cdataBlock
cdataBlock
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value,
int len)
const
libxml-xmlstring.html#xmlChar
xmlChar
*
#getPublicId
getPublicId
(void * ctx)
void
#inithtmlDefaultSAXHandler
inithtmlDefaultSAXHandler
(
libxml-parser.html#xmlSAXHandlerV1
xmlSAXHandlerV1
* hdlr)
void
#processingInstruction
processingInstruction
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* target,
const
libxml-xmlstring.html#xmlChar
xmlChar
* data)
void
#endElement
endElement
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
void
#namespaceDecl
namespaceDecl
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* href,
const
libxml-xmlstring.html#xmlChar
xmlChar
* prefix)
void
#initdocbDefaultSAXHandler
initdocbDefaultSAXHandler
(
libxml-parser.html#xmlSAXHandlerV1
xmlSAXHandlerV1
* hdlr)
libxml-tree.html#xmlEntityPtr
xmlEntityPtr
#getEntity
getEntity
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
void
#characters
characters
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ch,
int len)
void
#elementDecl
elementDecl
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
int type,
libxml-tree.html#xmlElementContentPtr
xmlElementContentPtr
content)
void
#startElement
startElement
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* fullname,
const
libxml-xmlstring.html#xmlChar
xmlChar
** atts)
libxml-tree.html#xmlEntityPtr
xmlEntityPtr
#getParameterEntity
getParameterEntity
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
void
#attributeDecl
attributeDecl
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* elem,
const
libxml-xmlstring.html#xmlChar
xmlChar
* fullname,
int type,
int def,
const
libxml-xmlstring.html#xmlChar
xmlChar
* defaultValue,
libxml-tree.html#xmlEnumerationPtr
xmlEnumerationPtr
tree)
int
#isStandalone
isStandalone
(void * ctx)
void
#internalSubset
internalSubset
(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ExternalID,
const
libxml-xmlstring.html#xmlChar
xmlChar
* SystemID)
void
#endDocument
endDocument
(void * ctx)
int
#getLineNumber
getLineNumber
(void * ctx)
Description
Function: comment
void	comment			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value)
A
libxml-SAX.html#comment
comment
has been parsed. DEPRECATED: use xmlSAX2Comment()
ctx
:
the user data (XML parser context)
value
:
the
libxml-SAX.html#comment
comment
content
Function: checkNamespace
int	checkNamespace			(void * ctx,
libxml-xmlstring.html#xmlChar
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
Function: getColumnNumber
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
Function: entityDecl
void	entityDecl			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
int type,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* systemId,
libxml-xmlstring.html#xmlChar
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).
Function: attribute
void	attribute			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* fullname,
const
libxml-xmlstring.html#xmlChar
xmlChar
* value)
Handle an
libxml-SAX.html#attribute
attribute
that has been read by the parser. The default handling is to convert the
libxml-SAX.html#attribute
attribute
into an DOM subtree and past it in a new
libxml-tree.html#xmlAttr
xmlAttr
element added to the element. DEPRECATED: use xmlSAX2Attribute()
ctx
:
the user data (XML parser context)
fullname
:
The
libxml-SAX.html#attribute
attribute
name, including namespace prefix
value
:
The
libxml-SAX.html#attribute
attribute
value
Function: getNamespace
libxml-tree.html#xmlNsPtr
xmlNsPtr
getNamespace		(void * ctx)
Get the current element namespace. DEPRECATED
ctx
:
the user data (XML parser context)
Returns
:
the
libxml-tree.html#xmlNsPtr
xmlNsPtr
or NULL if none
Function: setDocumentLocator
void	setDocumentLocator		(void * ctx,
libxml-tree.html#xmlSAXLocatorPtr
xmlSAXLocatorPtr
loc)
Receive the document locator at startup, actually
libxml-globals.html#xmlDefaultSAXLocator
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
Function: initxmlDefaultSAXHandler
void	initxmlDefaultSAXHandler	(
libxml-parser.html#xmlSAXHandlerV1
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
Function: ignorableWhitespace
void	ignorableWhitespace		(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ch,
int len)
receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use
libxml-SAX.html#characters
characters
DEPRECATED: use xmlSAX2IgnorableWhitespace()
ctx
:
the user data (XML parser context)
ch
:
a
libxml-xmlstring.html#xmlChar
xmlChar
string
len
:
the number of
libxml-xmlstring.html#xmlChar
xmlChar
Function: hasExternalSubset
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
Function: unparsedEntityDecl
void	unparsedEntityDecl		(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
xmlChar
* systemId,
const
libxml-xmlstring.html#xmlChar
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
Function: globalNamespace
void	globalNamespace			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* href,
const
libxml-xmlstring.html#xmlChar
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
Function: hasInternalSubset
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
Function: reference
void	reference			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
called when an entity
libxml-SAX.html#reference
reference
is detected. DEPRECATED: use xmlSAX2Reference()
ctx
:
the user data (XML parser context)
name
:
The entity name
Function: notationDecl
void	notationDecl			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
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
Function: getSystemId
const
libxml-xmlstring.html#xmlChar
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
libxml-xmlstring.html#xmlChar
xmlChar
*
Function: externalSubset
void	externalSubset			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ExternalID,
const
libxml-xmlstring.html#xmlChar
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)
Function: resolveEntity
libxml-tree.html#xmlParserInputPtr
xmlParserInputPtr
resolveEntity	(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* publicId,
const
libxml-xmlstring.html#xmlChar
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
libxml-tree.html#xmlParserInputPtr
xmlParserInputPtr
if inlined or NULL for DOM behaviour.
Function: startDocument
void	startDocument			(void * ctx)
called when the document start being processed. DEPRECATED: use xmlSAX2StartDocument()
ctx
:
the user data (XML parser context)
Function: setNamespace
void	setNamespace			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
Set the current element namespace. DEPRECATED
ctx
:
the user data (XML parser context)
name
:
the namespace prefix
Function: cdataBlock
void	cdataBlock			(void * ctx,
const
libxml-xmlstring.html#xmlChar
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
Function: getPublicId
const
libxml-xmlstring.html#xmlChar
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
libxml-xmlstring.html#xmlChar
xmlChar
*
Function: inithtmlDefaultSAXHandler
void	inithtmlDefaultSAXHandler	(
libxml-parser.html#xmlSAXHandlerV1
xmlSAXHandlerV1
* hdlr)
Initialize the default HTML SAX version 1 handler DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks
hdlr
:
the SAX handler
Function: processingInstruction
void	processingInstruction		(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* target,
const
libxml-xmlstring.html#xmlChar
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
Function: endElement
void	endElement			(void * ctx,
const
libxml-xmlstring.html#xmlChar
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
Function: namespaceDecl
void	namespaceDecl			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* href,
const
libxml-xmlstring.html#xmlChar
xmlChar
* prefix)
A namespace has been parsed. DEPRECATED
ctx
:
the user data (XML parser context)
href
:
the namespace associated URN
prefix
:
the namespace prefix
Function: initdocbDefaultSAXHandler
void	initdocbDefaultSAXHandler	(
libxml-parser.html#xmlSAXHandlerV1
xmlSAXHandlerV1
* hdlr)
Initialize the default DocBook SAX version 1 handler DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
hdlr
:
the SAX handler
Function: getEntity
libxml-tree.html#xmlEntityPtr
xmlEntityPtr
getEntity		(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
Get an entity by name DEPRECATED: use xmlSAX2GetEntity()
ctx
:
the user data (XML parser context)
name
:
The entity name
Returns
:
the
libxml-tree.html#xmlEntityPtr
xmlEntityPtr
if found.
Function: characters
void	characters			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ch,
int len)
receiving some chars from the parser. DEPRECATED: use xmlSAX2Characters()
ctx
:
the user data (XML parser context)
ch
:
a
libxml-xmlstring.html#xmlChar
xmlChar
string
len
:
the number of
libxml-xmlstring.html#xmlChar
xmlChar
Function: elementDecl
void	elementDecl			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
int type,
libxml-tree.html#xmlElementContentPtr
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
Function: startElement
void	startElement			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* fullname,
const
libxml-xmlstring.html#xmlChar
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
Function: getParameterEntity
libxml-tree.html#xmlEntityPtr
xmlEntityPtr
getParameterEntity	(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name)
Get a parameter entity by name DEPRECATED: use xmlSAX2GetParameterEntity()
ctx
:
the user data (XML parser context)
name
:
The entity name
Returns
:
the
libxml-tree.html#xmlEntityPtr
xmlEntityPtr
if found.
Function: attributeDecl
void	attributeDecl			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* elem,
const
libxml-xmlstring.html#xmlChar
xmlChar
* fullname,
int type,
int def,
const
libxml-xmlstring.html#xmlChar
xmlChar
* defaultValue,
libxml-tree.html#xmlEnumerationPtr
xmlEnumerationPtr
tree)
An
libxml-SAX.html#attribute
attribute
definition has been parsed DEPRECATED: use xmlSAX2AttributeDecl()
ctx
:
the user data (XML parser context)
elem
:
the name of the element
fullname
:
the
libxml-SAX.html#attribute
attribute
name
type
:
the
libxml-SAX.html#attribute
attribute
type
def
:
the type of default value
defaultValue
:
the
libxml-SAX.html#attribute
attribute
default value
tree
:
the tree of enumerated value set
Function: isStandalone
int	isStandalone			(void * ctx)
Is this document tagged standalone ? DEPRECATED: use xmlSAX2IsStandalone()
ctx
:
the user data (XML parser context)
Returns
:
1 if true
Function: internalSubset
void	internalSubset			(void * ctx,
const
libxml-xmlstring.html#xmlChar
xmlChar
* name,
const
libxml-xmlstring.html#xmlChar
xmlChar
* ExternalID,
const
libxml-xmlstring.html#xmlChar
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)
Function: endDocument
void	endDocument			(void * ctx)
called when the document end has been detected. DEPRECATED: use xmlSAX2EndDocument()
ctx
:
the user data (XML parser context)
Function: getLineNumber
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
../bugs.html
Daniel Veillard
