This abstract class provides the interface for the scanner to return XML document information up to the parser as it scans through the document
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. Some of the methods are designated as 'advanced' callbacks. They are enabled only if the 'setAdvancedCallbacks' flag has been set on the scanner. This scheme is used to avoid overhead when these more advanced events are not needed, such as in a SAX parser.
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.
length - The number of characters to read from the array.
cdataSection - Indicates that this data is inside a CDATA
section.
Locator
data - The body of the PI.
isRoot - Indicates if this is the root element.
length - The number of characters to read from the array.
cdataSection - Indicates that this data is inside a CDATA
section.
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
XML Parser for C++ 2.0 Copyright © IBM Corp, 1999 Center for Java Technology 10275 N. De Anza Blvd. Cupertino CA 95014 USA Email: xml4c@us.ibm.com |
|