This abstract class provides the interface for the scanner to return XML document information up to the parser as it scans through the document
![]() | Destructor | ||||||||||||||||||||||||
![]() | The document handler interface
|
This abstract class provides the interface for the scanner to return XML document information up to the parser as it scans through the document. The interface is very similar to org.sax.DocumentHandler, but has some extra methods required to get all the data out.
The scanner will call this method to report each chunk of
character data. The scanner may return all contiguous character
data in a single chunk, or they may split it into several
chunks; however, all of the characters in any single event
will come from the same external entity, so that the Locator
provides useful information. The parser must not attempt to read from the array
outside of the specified range.
Validating Parsers must use this method to report each chunk
of ignorable whitespace (see the W3C XML 1.0 recommendation,
section 2.10): non-validating parsers may also use this method
if they are capable of parsing and using content models. The scanner may return all contiguous whitespace in a single
chunk, or it may split it into several chunks; however, all of
the characters in any single event will come from the same
external entity, so that the Locator provides useful
information. The parser must not attempt to read from the array
outside of the specified range.
The document handler interface
virtual void docCharacters( const XMLCh* const chars, const unsigned int length, const bool cdataSection )
length - The number of characters to read from the array.
cdataSection - Indicates that this data is inside a CDATA
section.
Locator virtual void docComment( const XMLCh* const comment )
virtual void docPI( const XMLCh* const target, const XMLCh* const data )
data - The body of the PI. This may be an empty string since
the body is optional. virtual void endDocument()
virtual void endElement( const XMLElementDecl& elemDecl, const unsigned int uriId, const bool isRoot )
uriId - The ID of the URI in the URI pool (only valid if
name spaces is enabled)
isRoot - Indicates if this is the root element. virtual void endEntityReference( const XMLEntityDecl& entDecl )
virtual void ignorableWhitespace( const XMLCh* const chars, const unsigned int length, const bool cdataSection )
length - The number of characters to read from the array.
cdataSection - Indicates that this data is inside a CDATA
section.
virtual void resetDocument()
virtual void startDocument()
virtual void startElement( const XMLElementDecl& elemDecl, const unsigned int uriId, const XMLCh* const prefixName, const RefVectorOf<XMLAttr>& attrList, const unsigned int attrCount, const bool isEmpty, const bool isRoot )
uriId - The ID of the URI in the URI pool (only valid if
name spaces is enabled)
prefixName - The string representing the prefix name
attrList - List of attributes in the element
attrCount - Count of the attributes in the element
isEmpty - Indicates if the element is empty, in which case
you should not expect an endElement() event.
isRoot - Indicates if this is the root element. virtual void startEntityReference(const XMLEntityDecl& entDecl)
virtual void XMLDecl( const XMLCh* const versionStr, const XMLCh* const encodingStr, const XMLCh* const standaloneStr, const XMLCh* const autoEncodingStr )
version
attribute
of the XML decl.
encodingStr - The value of the encoding
attribute
of the XML decl.
standaloneStr - The value of the standalone
attribute of the XML decl.
autoEncodingStr - The encoding string auto-detected by the
scanner. In absence of any 'encoding' attribute in the
XML decl, the XML standard specifies how a parser can
auto-detect. If there is no encodingStr
this is what will be used to try to decode the file.
alphabetic index hierarchy of classes
Xerces-C XML Parser for C++ Version 1.1 |
|
generated by doc++