This class implements the Document Object Model (DOM) interface
Destructor
The document handler interface
protected Constructor
Error Handler interface
The pure virtual methods in this interface.
This class implements the Document Object Model (DOM) interface. It should be used by applications which choose to parse and process the XML document using the DOM api's. This implementation also allows the applications to install an error and an entitty handler (useful extensions to the DOM specification).It can be used to instantiate a validating or non-validating parser, by setting a member flag.
ErrorHandler* getErrorHandler()
const ErrorHandler* getErrorHandler() const
EntityResolver* getEntityResolver()
const EntityResolver* getEntityResolver() const
const XMLScanner& getScanner() const
const XMLValidator& getValidator() const
bool getDoNamespaces() const
bool getDoValidation() const
bool getExitOnFirstFatalError() const
bool getExpandEntityReferences() const
The parser's default state is: false. This flag is ignored by the underlying scanner if the installed
validator indicates that namespace constraints should be
enforced.
By default, the parser does not to any validation. The default
value is false.
The default value is 'true' and the parser exits on the
first fatal error.
void setEntityResolver(EntityResolver* const handler)
void setDoNamespaces(const bool newState)
void setDoValidation(const bool newState)
void setExitOnFirstFatalError(const bool newState)
void setExpandEntityReferences(const bool expand)
This method is used to start a progressive parse on a XML file.
To continue parsing, subsequent calls must be to the parseNext
method.
It scans through the prolog and returns a token to be used on
subsequent scanNext() calls. If the return value is true, then the
token is legal and ready for further use. If it returns false, then
the scan of the prolog failed and the token is not going to work on
subsequent scanNext() calls.
This method is used to start a progressive parse on a XML file.
To continue parsing, subsequent calls must be to the parseNext
method.
It scans through the prolog and returns a token to be used on
subsequent scanNext() calls. If the return value is true, then the
token is legal and ready for further use. If it returns false, then
the scan of the prolog failed and the token is not going to work on
subsequent scanNext() calls.
This method is used to start a progressive parse on a XML file.
To continue parsing, subsequent calls must be to the parseNext
method.
It scans through the prolog and returns a token to be used on
subsequent scanNext() calls. If the return value is true, then the
token is legal and ready for further use. If it returns false, then
the scan of the prolog failed and the token is not going to work on
subsequent scanNext() calls.
This method is used to continue with progressive parsing of
XML files started by a call to 'parseFirst' method.
It parses the XML file and stops as soon as it comes across
a XML token (as defined in the XML specification). void parse(const XMLCh* const systemId, const bool reuseValidator = false)
reuseValidator - The flag indicating whether the existing
validator should be reused or not for this
parsing run.
void parse(const char* const systemId, const bool reuseValidator = false)
reuseValidator - The flag indicating whether the existing
validator should be reused or not for this
parsing run. bool parseFirst( const XMLCh* const systemId, XMLPScanToken& toFill, const bool reuseValidator = false )
toFill - A token maintaing state information to maintain
internal consistency between invocation of 'parseNext'
calls.
reuseValidator - The flag indicating whether the existing validator
should be reused or not for this parsing
process.
parseFirst(char*,...)
parseFirst(InputSource&,...) bool parseFirst( const char* const systemId, XMLPScanToken& toFill, const bool reuseValidator = false )
toFill - A token maintaing state information to maintain
internal consistency between invocation of 'parseNext'
calls.
reuseValidator - The flag indicating whether the existing validator
should be reused or not for this parsing
run.
parseFirst(XMLCh*,...)
parseFirst(InputSource&,...) bool parseFirst( const InputSource& source, XMLPScanToken& toFill, const bool reuseValidator = false )
toFill - A token maintaing state information to maintain
internal consistency between invocation of 'parseNext'
calls.
reuseValidator - The flag indicating whether the existing validator
should be reused or not for this parsing
process.
parseFirst(XMLCh*,...)
parseFirst(char*,...) bool parseNext(XMLPScanToken& token)
parseFirst(char*,...)
parseFirst(InputSource&,...)
virtual void resetErrors()
virtual bool expandSystemId( const XMLCh* const systemId, XMLBuffer& toFill )
toFill - A pointer to a buffer in which the application
processed system id is stored.
virtual void resetEntities()
virtual InputSource* resolveEntity( const XMLCh* const publicId, const XMLCh* const systemId )
systemId - A const pointer to a Unicode string representing the
system id of the entity just parsed.
virtual void startInputSource(const InputSource& inputSource)
Any whitespace before content is ignored. If the current
node is already of type DOM_Node::TEXT_NODE, then these
whitespaces are appended, otherwise a new Text node is
created which stores this data. Essentially all ignoreable
characters are collected in one node.
virtual void docComment( const XMLCh* const comment )
virtual void docPI( const XMLCh* const target, const XMLCh* const data )
data - A const pointer to a Unicode string representing the
data of the PI declaration. See the PI production rule
in the XML specification for details. virtual void endDocument()
virtual void endElement( const XMLElementDecl& elemDecl, const unsigned int urlId, const bool isRoot )
urlId - An id referring to the namespace prefix, if
namespaces setting is switched on.
isRoot - A flag indicating whether this element was 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 length of the Unicode string 'chars'.
cdataSection - A flag indicating if the characters represent
content from the CDATA section. virtual void resetDocument()
virtual void startDocument()
virtual void startElement( const XMLElementDecl& elemDecl, const unsigned int urlId, const XMLCh* const elemPrefix, const RefVectorOf<XMLAttr>& attrList, const unsigned int attrCount, const bool isEmpty, const bool isRoot )
urlId - An id referring to the namespace prefix, if
namespaces setting is switched on.
elemPrefix - A const pointer to a Unicode string containing
the namespace prefix for this element. Applicable
only when namespace processing is enabled.
attrList - A const reference to the object containing the
list of attributes just scanned for this element.
attrCount - A count of number of attributes in the list
specified by the parameter 'attrList'.
isEmpty - A flag indicating whether this is an empty element
or not.
isRoot - A flag indicating whether this element was 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 actualEncStr )
encodingStr - A const pointer to a Unicode string representing
the encoding string value.
standaloneStr - A const pointer to a Unicode string
representing the standalone string value.
actualEncodingStr - A const pointer to a Unicode string
representing the actual encoding string
value.
void setDocument(DOM_Document toSet)
alphabetic index hierarchy of classes
Xerces-C XML Parser for C++ Version 1.1 |
|
generated by doc++