zorba::SAX2_ContentHandler

#include <zorba/sax2.h>

Receive notification of events that result from serializing a query result as XML. This is an interface that is used to receive notifications resulting from parsing a query result that was serialized as XML.Instances of classes that implement this interface can be registered for a query by calling the XQuery::registerSAXHandler or XQuery::executeSAX function.

Public Functions

void

characters(const String &aText)=0

Receive notification of character data.

void

endDocument()=0

Receive notification of the end of a document.

void

endElement(const String &aURI, const String &aLocalname, const String &aQName)=0

Receive notification of the end of an element.

void

endPrefixMapping(const String &aPrefix)=0

Receive notification of the end of an namespace prefix mapping.

void

ignorableWhitespace(const String &aText)=0

Receive notification of ignorable whitespace in element content.

void

processingInstruction(const String &aTarget, const String &aData)=0

Receive notification of a processing instruction.

void

skippedEntity(const String &aName)=0

Receive notification of a skipped entity.

void

startDocument()=0

Receive notification of the beginning of a document.

void

startElement(const String &aURI, const String &aLocalname, const String &aQName, const SAX2_Attributes &aAttrs)=0

Receive notification of the beginning of an element.

void

startPrefixMapping(const String &aPrefix, const String &aURI)=0

Receive notification of the start of an namespace prefix mapping.

~SAX2_ContentHandler()

Destructor.

Public Functions

characters

void characters(const String &aText)=0

Receive notification of character data.

The serializer will call this method to report each chunk of character data.

Parameters

aText the characters from the serialized result.

endDocument

void endDocument()=0

Receive notification of the end of a document.

endElement

void endElement(const String &aURI, const String &aLocalname, const String &aQName)=0

Receive notification of the end of an element.

Zorba's serializerwill invoke this method at the end of every element in the serialized query result document; there will be a corresponding startElement() event for every endElement() event (even when the element is empty).

Parameters

aURI the URI of the asscioated namespace for this element
aLocalname the local part of the element name
aQName the QName of this element

endPrefixMapping

void endPrefixMapping(const String &aPrefix)=0

Receive notification of the end of an namespace prefix mapping.

Parameters

aPrefix the namespace prefix used.

ignorableWhitespace

void ignorableWhitespace(const String &aText)=0

Receive notification of ignorable whitespace in element content.

Parameters

aText the characters from the serialized query result.

processingInstruction

void processingInstruction(const String &aTarget, const String &aData)=0

Receive notification of a processing instruction.

The serializer will invoke this method once for each processing instruction found.

Parameters

aTarget the processing instruction target.
aData the processing instruction data, or null if none was supplied.

skippedEntity

void skippedEntity(const String &aName)=0

Receive notification of a skipped entity.

Parameters

aName the name of the skipped entity.

startDocument

void startDocument()=0

Receive notification of the beginning of a document.

startElement

void startElement(const String &aURI, const String &aLocalname, const String &aQName, const SAX2_Attributes &aAttrs)=0

Receive notification of the beginning of an element.

Zorba's serializer will invoke this method at the beginning of every element of the serialized query result; there will be a corresponding endElement() event for every startElement() event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement() event.

Parameters

aURI the URI of the associated namespace for this element.
aLocalname thee local part of the element name.
aQName the QName of this element.
aAttrs the attributes attached to the element, if any.

startPrefixMapping

void startPrefixMapping(const String &aPrefix, const String &aURI)=0

Receive notification of the start of an namespace prefix mapping.

Parameters

aPrefix the namespace prefix used
aURI the namespace URI used.

~SAX2_ContentHandler

 ~SAX2_ContentHandler()

Destructor.