Xerces-C++: AbstractDOMParser Class Reference

Xerces-C++ 3.3.0

List of all members
AbstractDOMParser Class Reference

This class implements the Document Object Model (DOM) interface. More...

`#include <xercesc/parsers/AbstractDOMParser.hpp>`

Inheritance diagram for AbstractDOMParser:

## Public Types
Public constants
enum | ValSchemes { Val_Never , Val_Always , Val_Auto }
| ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors. More...
Public Types inherited from XMLErrorReporter
enum | ErrTypes { ErrType_Warning , ErrType_Error , ErrType_Fatal , ErrTypes_Unknown }

## Public Member Functions
Destructor
virtual | ~AbstractDOMParser ()
| Destructor.
Utility methods
void | reset ()
| Reset the parser.
DOMDocument * | adoptDocument ()
| Adopt the DOM document.
Getter methods
DOMDocument * | getDocument ()
| Get the DOM document.
const XMLValidator & | getValidator () const
| Get a const reference to the validator.
ValSchemes | getValidationScheme () const
| This method returns an enumerated value that indicates the current validation scheme set on this parser.
bool | getDoSchema () const
| Get the 'do schema' flag.
bool | getValidationSchemaFullChecking () const
| Get the 'full schema constraint checking' flag.
bool | getIdentityConstraintChecking () const
| Get the identity constraint checking' flag.
XMLSize_t | getErrorCount () const
| Get error count from the last parse operation.
bool | getDoNamespaces () const
| Get the 'do namespaces' flag.
bool | getExitOnFirstFatalError () const
| Get the 'exit on first error' flag.
bool | getValidationConstraintFatal () const
| This method returns the state of the parser's validation-constraint-fatal flag.
bool | getCreateEntityReferenceNodes () const
| Get the 'include entity references' flag.
bool | getIncludeIgnorableWhitespace () const
| Get the 'include ignorable whitespace' flag.
XMLCh * | getExternalSchemaLocation () const
| Get the set of Namespace/SchemaLocation that is specified externally.
XMLCh * | getExternalNoNamespaceSchemaLocation () const
| Get the noNamespace SchemaLocation that is specified externally.
SecurityManager * | getSecurityManager () const
| Get the SecurityManager instance attached to this parser.
const XMLSize_t & | getLowWaterMark () const
| Get the raw buffer low water mark for this parser.
bool | getDisallowDoctype () const
| Get the 'Disallow DOCTYPE (DTD)' flag.
bool | getLoadExternalDTD () const
| Get the 'Loading External DTD' flag.
bool | getLoadSchema () const
| Get the 'Loading Schema' flag.
bool | getCreateCommentNodes () const
| Get the 'create comment node' flag.
bool | getCalculateSrcOfs () const
| Get the 'calculate src offset flag'.
bool | getStandardUriConformant () const
| Get the 'force standard uri flag'.
PSVIHandler * | getPSVIHandler ()
| This method returns the installed PSVI handler.
const PSVIHandler * | getPSVIHandler () const
| This method returns the installed PSVI handler.
bool | getCreateSchemaInfo () const
| Get the 'associate schema info' flag.
bool | getDoXInclude () const
| Get the 'do XInclude' flag.
bool | getGenerateSyntheticAnnotations () const
| Get the 'generate synthetic annotations' flag.
bool | getValidateAnnotations () const
| Get the 'validate annotations' flag.
bool | getIgnoreAnnotations () const
| Get the 'ignore annotations' flag.
bool | getDisableDefaultEntityResolution () const
| Get the 'disable default entity resolution' flag.
bool | getSkipDTDValidation () const
| Get the 'skip DTD validation' flag.
bool | getHandleMultipleImports () const
| Get the 'handle multiple schema imports' flag.
Setter methods
void | setGenerateSyntheticAnnotations (const bool newValue)
| set the 'generate synthetic annotations' flag
void | setValidateAnnotations (const bool newValue)
| set the 'validlate annotations' flag
void | setDoNamespaces (const bool newState)
| Set the 'do namespaces' flag.
void | setExitOnFirstFatalError (const bool newState)
| Set the 'exit on first error' flag.
void | setValidationConstraintFatal (const bool newState)
| This method allows users to set the parser's behaviour when it encounters a validation constraint error.
void | setCreateEntityReferenceNodes (const bool create)
| Set the 'include entity references' flag.
void | setIncludeIgnorableWhitespace (const bool include)
| Set the 'include ignorable whitespace' flag.
void | setValidationScheme (const ValSchemes newScheme)
| This method allows users to set the validation scheme to be used by this parser.
void | setDoSchema (const bool newState)
| Set the 'do schema' flag.
void | setValidationSchemaFullChecking (const bool schemaFullChecking)
| This method allows the user to turn full Schema constraint checking on/off.
void | setIdentityConstraintChecking (const bool newState)
| This method allows users to enable or disable the parser's identity constraint checks.
void | setExternalSchemaLocation (const XMLCh *const schemaLocation)
| This method allows the user to specify a list of schemas to use.
void | setExternalSchemaLocation (const char *const schemaLocation)
| This method is same as setExternalSchemaLocation(const XMLCh* const).
void | setExternalNoNamespaceSchemaLocation (const XMLCh *const noNamespaceSchemaLocation)
| This method allows the user to specify the no target namespace XML Schema Location externally.
void | setExternalNoNamespaceSchemaLocation (const char *const noNamespaceSchemaLocation)
| This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).
void | setSecurityManager (SecurityManager *const securityManager)
| This allows an application to set a SecurityManager on the parser; this object stores information that various components use to limit their consumption of system resources while processing documents.
void | setLowWaterMark (XMLSize_t lwm)
| Set the raw buffer low water mark for this parser.
void | setDisallowDoctype (const bool newState)
| Set the 'Disallow DOCTYPE (DTD)' flag.
void | setLoadExternalDTD (const bool newState)
| Set the 'Loading External DTD' flag.
void | setLoadSchema (const bool newState)
| Set the 'Loading Schema' flag.
void | setCreateCommentNodes (const bool create)
| Set the 'create comment nodes' flag.
void | setCalculateSrcOfs (const bool newState)
| Enable/disable src offset calculation.
void | setStandardUriConformant (const bool newState)
| Force standard uri.
void | useScanner (const XMLCh *const scannerName)
| Set the scanner to use when scanning the XML document.
void | useImplementation (const XMLCh *const implementationFeatures)
| Set the implementation to use when creating the document.
virtual void | setPSVIHandler (PSVIHandler *const handler)
| This method installs the user specified PSVI handler on the parser.
void | setCreateSchemaInfo (const bool newState)
| Set the 'associate schema info' flag.
void | setDoXInclude (const bool newState)
| Set the 'do XInclude' flag.
void | setIgnoreAnnotations (const bool newValue)
| Set the 'ignore annotation' flag.
void | setDisableDefaultEntityResolution (const bool newValue)
| Set the 'disable default entity resolution' flag.
void | setSkipDTDValidation (const bool newValue)
| Set the 'skip DTD validation' flag.
void | setHandleMultipleImports (const bool newValue)
| Set the 'handle multiple schema imports' flag.
Parsing methods
void | parse (const InputSource &source)
| Parse via an input source object.
void | parse (const XMLCh *const systemId)
| Parse via a file path or URL.
void | parse (const char *const systemId)
| Parse via a file path or URL (in the local code page)
bool | parseFirst (const XMLCh *const systemId, XMLPScanToken &toFill)
| Begin a progressive parse operation.
bool | parseFirst (const char *const systemId, XMLPScanToken &toFill)
| Begin a progressive parse operation.
bool | parseFirst (const InputSource &source, XMLPScanToken &toFill)
| Begin a progressive parse operation.
bool | parseNext (XMLPScanToken &token)
| Continue a progressive parse operation.
void | parseReset (XMLPScanToken &token)
| Reset the parser after a progressive parse.
Implementation of the PSVIHandler interface.
virtual void | handleElementPSVI (const XMLCh *const localName, const XMLCh *const uri, PSVIElement *elementInfo)
| Receive notification of the PSVI properties of an element.
virtual void | handlePartialElementPSVI (const XMLCh *const localName, const XMLCh *const uri, PSVIElement *elementInfo)
| Receive notification of partial PSVI properties of an element.
virtual void | handleAttributesPSVI (const XMLCh *const localName, const XMLCh *const uri, PSVIAttributeList *psviAttributes)
| Enables PSVI information about attributes to be passed back to the application.
Implementation of the XMLDocumentHandler interface.
virtual void | docCharacters (const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)
| Handle document character events.
virtual void | docComment (const XMLCh *const comment)
| Handle a document comment event.
virtual void | docPI (const XMLCh *const target, const XMLCh *const data)
| Handle a document PI event.
virtual void | endDocument ()
| Handle the end of document event.
virtual void | endElement (const XMLElementDecl &elemDecl, const unsigned int urlId, const bool isRoot, const XMLCh *const elemPrefix)
| Handle and end of element event.
virtual void | endEntityReference (const XMLEntityDecl &entDecl)
| Handle and end of entity reference event.
virtual void | ignorableWhitespace (const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)
| Handle an ignorable whitespace vent.
virtual void | resetDocument ()
| Handle a document reset event.
virtual void | startDocument ()
| Handle a start document event.
virtual void | startElement (const XMLElementDecl &elemDecl, const unsigned int urlId, const XMLCh *const elemPrefix, const RefVectorOf< XMLAttr > &attrList, const XMLSize_t attrCount, const bool isEmpty, const bool isRoot)
| Handle a start element event.
virtual void | startEntityReference (const XMLEntityDecl &entDecl)
| Handle a start entity reference event.
virtual void | XMLDecl (const XMLCh *const versionStr, const XMLCh *const encodingStr, const XMLCh *const standaloneStr, const XMLCh *const actualEncStr)
| Handle an XMLDecl event.
Public Member Functions inherited from XMemory
void * | operator new (size_t size)
| This method overrides operator new.
void * | operator new (size_t size, MemoryManager *memMgr)
| This method defines a custom operator new, that will use the provided memory manager to perform the allocation.
void * | operator new (size_t size, void *ptr)
| This method overrides placement operator new.
void | operator delete (void *p)
| This method overrides operator delete.
void | operator delete (void *p, MemoryManager *memMgr)
| This method provides a matching delete for the custom operator new.
void | operator delete (void *p, void *ptr)
| This method provides a matching delete for the placement new.
Public Member Functions inherited from XMLDocumentHandler
virtual | ~XMLDocumentHandler ()
Public Member Functions inherited from XMLErrorReporter
virtual | ~XMLErrorReporter ()
| Default destructor.
virtual void | error (const unsigned int errCode, const XMLCh *const errDomain, const ErrTypes type, const XMLCh *const errorText, const XMLCh *const systemId, const XMLCh *const publicId, const XMLFileLoc lineNum, const XMLFileLoc colNum)=0
| Called to report errors from the scanner or validator.
virtual void | resetErrors ()=0
| Called before a new parse event to allow the handler to reset.
Public Member Functions inherited from XMLEntityHandler
virtual | ~XMLEntityHandler ()
| Default destructor.
virtual void | endInputSource (const InputSource &inputSource)=0
| This method get called after the scanner has finished reading from the given input source while processing external entity references.
virtual bool | expandSystemId (const XMLCh *const systemId, XMLBuffer &toFill)=0
| This method allows the passes the scanned systemId to the entity handler, thereby giving it a chance to provide any customized handling like resolving relative path names.
virtual void | resetEntities ()=0
| This method allows the entity handler to reset itself, so that it can be used again.
virtual InputSource * | resolveEntity (XMLResourceIdentifier *resourceIdentifier)=0
| This method allows the entity handler to provide customized application specific entity resolution.
virtual void | startInputSource (const InputSource &inputSource)=0
| This method will be called before the scanner starts reading from an input source while processing external entity references.
Public Member Functions inherited from PSVIHandler
virtual | ~PSVIHandler ()

## Protected Member Functions
Constructors
| AbstractDOMParser (XMLValidator *const valToAdopt=0, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager, XMLGrammarPool *const gramPool=0)
| Construct a AbstractDOMParser, with an optional validator.
Protected getter methods
DOMNode * | getCurrentNode ()
| Get the current DOM node.
XMLScanner * | getScanner () const
| Get the XML scanner.
GrammarResolver * | getGrammarResolver () const
| Get the Grammar resolver.
bool | getParseInProgress () const
| Get the parse in progress flag.
MemoryManager * | getMemoryManager () const
Protected setter methods
void | setCurrentNode (DOMNode *toSet)
| Set the current DOM node.
void | setDocument (DOMDocument *toSet)
| Set the document node.
void | setParseInProgress (const bool toSet)
| Set the parse in progress flag.
Protected Member Functions inherited from XMemory
| XMemory ()
| Protected default constructor.
Protected Member Functions inherited from XMLDocumentHandler
| XMLDocumentHandler ()
Protected Member Functions inherited from XMLErrorReporter
| XMLErrorReporter ()
| Default constructor.
Protected Member Functions inherited from XMLEntityHandler
| XMLEntityHandler ()
| Protected default constructor.
Protected Member Functions inherited from PSVIHandler
| PSVIHandler ()

## Protected helper methods
bool | fCreateEntityReferenceNodes
bool | fIncludeIgnorableWhitespace
bool | fWithinElement
bool | fParseInProgress
bool | fCreateCommentNodes
bool | fDocumentAdoptedByUser
bool | fCreateSchemaInfo
bool | fDoXInclude
XMLScanner * | fScanner
XMLCh * | fImplementationFeatures
DOMNode * | fCurrentParent
DOMNode * | fCurrentNode
DOMEntityImpl * | fCurrentEntity
DOMDocumentImpl * | fDocument
DOMDocumentTypeImpl * | fDocumentType
RefVectorOf< DOMDocumentImpl > * | fDocumentVector
GrammarResolver * | fGrammarResolver
XMLStringPool * | fURIStringPool
XMLValidator * | fValidator
MemoryManager * | fMemoryManager
XMLGrammarPool * | fGrammarPool
XMLBufferMgr | fBufMgr
XMLBuffer & | fInternalSubset
PSVIHandler * | fPSVIHandler
void | resetPool ()
bool | isDocumentAdopted () const
| Returns true if the user has adopted the document.

## Deprecated DocTypeHandler Interfaces
virtual void | attDef (const DTDElementDecl &elemDecl, const DTDAttDef &attDef, const bool ignoring)
virtual void | doctypeComment (const XMLCh *const comment)
virtual void | doctypeDecl (const DTDElementDecl &elemDecl, const XMLCh *const publicId, const XMLCh *const systemId, const bool hasIntSubset, const bool hasExtSubset=false)
virtual void | doctypePI (const XMLCh *const target, const XMLCh *const data)
virtual void | doctypeWhitespace (const XMLCh *const chars, const XMLSize_t length)
virtual void | elementDecl (const DTDElementDecl &decl, const bool isIgnored)
virtual void | endAttList (const DTDElementDecl &elemDecl)
virtual void | endIntSubset ()
virtual void | endExtSubset ()
virtual void | entityDecl (const DTDEntityDecl &entityDecl, const bool isPEDecl, const bool isIgnored)
virtual void | resetDocType ()
virtual void | notationDecl (const XMLNotationDecl &notDecl, const bool isIgnored)
virtual void | startAttList (const DTDElementDecl &elemDecl)
virtual void | startIntSubset ()
virtual void | startExtSubset ()
virtual void | TextDecl (const XMLCh *const versionStr, const XMLCh *const encodingStr)
virtual DOMCDATASection * | createCDATASection (const XMLCh *, XMLSize_t)
virtual DOMText * | createText (const XMLCh *, XMLSize_t)
virtual DOMElement * | createElement (const XMLCh *name)
virtual DOMElement * | createElementNS (const XMLCh *namespaceURI, const XMLCh *elemPrefix, const XMLCh *localName, const XMLCh *qName)
virtual DOMAttr * | createAttr (const XMLCh *name)
virtual DOMAttr * | createAttrNS (const XMLCh *namespaceURI, const XMLCh *elemPrefix, const XMLCh *localName, const XMLCh *qName)

## Detailed Description

This class implements the Document Object Model (DOM) interface.

It is used as a base for DOM parsers (i.e. XercesDOMParser, DOMLSParser).

## Member Enumeration Documentation

## ◆ ValSchemes

enum AbstractDOMParser::ValSchemes

ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors.

Val_Always: The parser will always report validation errors. Val_Auto: The parser will report validation errors only if a grammar is specified.

See also
  setValidationScheme

Enumerator
Val_Never |
Val_Always |
Val_Auto |

## Constructor & Destructor Documentation

## ◆ ~AbstractDOMParser()

virtual AbstractDOMParser::~AbstractDOMParser | ( |  | ) |
| virtual

Destructor.

## ◆ AbstractDOMParser()

AbstractDOMParser::AbstractDOMParser | ( | XMLValidator *const | valToAdopt = 0,
|  | MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager,
|  | XMLGrammarPool *const | gramPool = 0 )
| protected

Construct a AbstractDOMParser, with an optional validator.

Constructor with an instance of validator class to use for validation. If you don't provide a validator, a default one will be created for you in the scanner.

Parameters

  valToAdopt | Pointer to the validator instance to use. The parser is responsible for freeing the memory.
  gramPool | Pointer to the grammar pool instance from external application (through derivatives). The parser does NOT own it.
  manager | Pointer to the memory manager to be used to allocate objects.

## Member Function Documentation

## ◆ adoptDocument()

DOMDocument * AbstractDOMParser::adoptDocument | ( |  | ) |

Adopt the DOM document.

This method returns the DOMDocument object representing the root of the document tree.

The caller will adopt the DOMDocument and thus is responsible to call DOMDocument::release() to release the associated memory. The parser will not delete it. The ownership is transferred from the parser to the caller.

Returns
  The adopted DOMDocument object which represents the entire XML document.

## ◆ attDef()

virtual void AbstractDOMParser::attDef | ( | const DTDElementDecl & | elemDecl,
|  | const DTDAttDef & | attDef,
|  | const bool | ignoring )
| virtual

## ◆ createAttr()

virtual DOMAttr * AbstractDOMParser::createAttr | ( | const XMLCh * | name | ) |
| protectedvirtual

## ◆ createAttrNS()

virtual DOMAttr * AbstractDOMParser::createAttrNS | ( | const XMLCh * | namespaceURI,
|  | const XMLCh * | elemPrefix,
|  | const XMLCh * | localName,
|  | const XMLCh * | qName )
| protectedvirtual

## ◆ createCDATASection()

virtual DOMCDATASection * AbstractDOMParser::createCDATASection | ( | const XMLCh * | ,
|  | XMLSize_t | )
| protectedvirtual

## ◆ createElement()

virtual DOMElement * AbstractDOMParser::createElement | ( | const XMLCh * | name | ) |
| protectedvirtual

## ◆ createElementNS()

virtual DOMElement * AbstractDOMParser::createElementNS | ( | const XMLCh * | namespaceURI,
|  | const XMLCh * | elemPrefix,
|  | const XMLCh * | localName,
|  | const XMLCh * | qName )
| protectedvirtual

## ◆ createText()

virtual DOMText * AbstractDOMParser::createText | ( | const XMLCh * | ,
|  | XMLSize_t | )
| protectedvirtual

## ◆ docCharacters()

virtual void AbstractDOMParser::docCharacters | ( | const XMLCh *const | chars,
|  | const XMLSize_t | length,
|  | const bool | cdataSection )
| virtual

Handle document character events.

This method is used to report all the characters scanned by the parser. This DOM implementation stores this data in the appropriate DOM node, creating one if necessary.

Parameters

  chars | A const pointer to a Unicode string representing the character data.
  length | The length of the Unicode string returned in 'chars'.
  cdataSection | A flag indicating if the characters represent content from the CDATA section.

Implements XMLDocumentHandler.

## ◆ docComment()

virtual void AbstractDOMParser::docComment | ( | const XMLCh *const | comment | ) |
| virtual

Handle a document comment event.

This method is used to report any comments scanned by the parser. A new comment node is created which stores this data.

Parameters

  comment | A const pointer to a null terminated Unicode string representing the comment text.

Implements XMLDocumentHandler.

## ◆ docPI()

virtual void AbstractDOMParser::docPI | ( | const XMLCh *const | target,
|  | const XMLCh *const | data )
| virtual

Handle a document PI event.

This method is used to report any PI scanned by the parser. A new PI node is created and appended as a child of the current node in the tree.

Parameters

  target | A const pointer to a Unicode string representing the target of the PI declaration.
  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.

Implements XMLDocumentHandler.

## ◆ doctypeComment()

virtual void AbstractDOMParser::doctypeComment | ( | const XMLCh *const | comment | ) |
| virtual

## ◆ doctypeDecl()

virtual void AbstractDOMParser::doctypeDecl | ( | const DTDElementDecl & | elemDecl,
|  | const XMLCh *const | publicId,
|  | const XMLCh *const | systemId,
|  | const bool | hasIntSubset,
|  | const bool | hasExtSubset = false )
| virtual

## ◆ doctypePI()

virtual void AbstractDOMParser::doctypePI | ( | const XMLCh *const | target,
|  | const XMLCh *const | data )
| virtual

## ◆ doctypeWhitespace()

virtual void AbstractDOMParser::doctypeWhitespace | ( | const XMLCh *const | chars,
|  | const XMLSize_t | length )
| virtual

## ◆ elementDecl()

virtual void AbstractDOMParser::elementDecl | ( | const DTDElementDecl & | decl,
|  | const bool | isIgnored )
| virtual

## ◆ endAttList()

virtual void AbstractDOMParser::endAttList | ( | const DTDElementDecl & | elemDecl | ) |
| virtual

## ◆ endDocument()

virtual void AbstractDOMParser::endDocument | ( |  | ) |
| virtual

Handle the end of document event.

This method is used to indicate the end of the current document.

Implements XMLDocumentHandler.

## ◆ endElement()

virtual void AbstractDOMParser::endElement | ( | const XMLElementDecl & | elemDecl,
|  | const unsigned int | urlId,
|  | const bool | isRoot,
|  | const XMLCh *const | elemPrefix )
| virtual

Handle and end of element event.

This method is used to indicate the end tag of an element. The DOM parser pops the current element off the top of the element stack, and make it the new current element.

Parameters

  elemDecl | A const reference to the object containing element declaration information.
  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.
  elemPrefix | A const pointer to a Unicode string containing the namespace prefix for this element. Applicable only when namespace processing is enabled.

Implements XMLDocumentHandler.

## ◆ endEntityReference()

virtual void AbstractDOMParser::endEntityReference | ( | const XMLEntityDecl & | entDecl | ) |
| virtual

Handle and end of entity reference event.

This method is used to indicate that an end of an entity reference was just scanned.

Parameters

  entDecl | A const reference to the object containing the entity declaration information.

Implements XMLDocumentHandler.

## ◆ endExtSubset()

virtual void AbstractDOMParser::endExtSubset | ( |  | ) |
| virtual

## ◆ endIntSubset()

virtual void AbstractDOMParser::endIntSubset | ( |  | ) |
| virtual

## ◆ entityDecl()

virtual void AbstractDOMParser::entityDecl | ( | const DTDEntityDecl & | entityDecl,
|  | const bool | isPEDecl,
|  | const bool | isIgnored )
| virtual

## ◆ getCalculateSrcOfs()

bool AbstractDOMParser::getCalculateSrcOfs | ( |  | ) | const

Get the 'calculate src offset flag'.

This method returns the state of the parser's src offset calculation when parsing an XML document.

Returns
  true, if the parser is currently configured to calculate src offsets, false otherwise.

See also
  setCalculateSrcOfs

## ◆ getCreateCommentNodes()

bool AbstractDOMParser::getCreateCommentNodes | ( |  | ) | const

Get the 'create comment node' flag.

This method returns the flag that specifies whether the parser is creating comment nodes in the DOM tree being produced.

Returns
  The state of the create comment node flag.

See also
  setCreateCommentNodes

References fCreateCommentNodes.

## ◆ getCreateEntityReferenceNodes()

bool AbstractDOMParser::getCreateEntityReferenceNodes | ( |  | ) | const

Get the 'include entity references' flag.

This method returns the flag that specifies whether the parser is creating entity reference nodes in the DOM tree being produced.

Returns
  The state of the create entity reference node flag.

See also
  setCreateEntityReferenceNodes

References fCreateEntityReferenceNodes.

## ◆ getCreateSchemaInfo()

bool AbstractDOMParser::getCreateSchemaInfo | ( |  | ) | const

Get the 'associate schema info' flag.

This method returns the flag that specifies whether the parser is storing schema informations in the element and attribute nodes in the DOM tree being produced.

Returns
  The state of the associate schema info flag.

See also
  setCreateSchemaInfo

References fCreateSchemaInfo.

## ◆ getCurrentNode()

DOMNode * AbstractDOMParser::getCurrentNode | ( |  | ) |
| protected

Get the current DOM node.

This provides derived classes with access to the current node, i.e. the node to which new nodes are being added.

References fCurrentNode.

## ◆ getDisableDefaultEntityResolution()

bool AbstractDOMParser::getDisableDefaultEntityResolution | ( |  | ) | const

Get the 'disable default entity resolution' flag.

Returns
  true, if the parser is currently configured to not perform default entity resolution, false otherwise.

See also
  setDisableDefaultEntityResolution

## ◆ getDisallowDoctype()

bool AbstractDOMParser::getDisallowDoctype | ( |  | ) | const

Get the 'Disallow DOCTYPE (DTD)' flag.

This method returns the state of the parser's disallowed DOCTYPE flag.

Returns
  false, if the parser is currently configured to allow DOCTYPE, true otherwise.

See also
  setDisallowDoctype()
  getLoadExternalDTD
  getValidationScheme

## ◆ getDocument()

DOMDocument * AbstractDOMParser::getDocument | ( |  | ) |

Get the DOM document.

This method returns the DOMDocument object representing the root of the document tree. This object provides the primary access to the document's data.

The returned DOMDocument object is owned by the parser.

Returns
  The DOMDocument object which represents the entire XML document.

## ◆ getDoNamespaces()

bool AbstractDOMParser::getDoNamespaces | ( |  | ) | const

Get the 'do namespaces' flag.

This method returns the state of the parser's namespace processing flag.

Returns
  true, if the parser is currently configured to understand namespaces, false otherwise.

See also
  setDoNamespaces

## ◆ getDoSchema()

bool AbstractDOMParser::getDoSchema | ( |  | ) | const

Get the 'do schema' flag.

This method returns the state of the parser's schema processing flag.

Returns
  true, if the parser is currently configured to understand schema, false otherwise.

See also
  setDoSchema

## ◆ getDoXInclude()

bool AbstractDOMParser::getDoXInclude | ( |  | ) | const

Get the 'do XInclude' flag.

This method returns the flag that specifies whether the parser will process XInclude nodes in the DOM tree being produced.

Returns
  The state of the 'do XInclude' flag.

See also
  setDoXInclude

References fDoXInclude.

## ◆ getErrorCount()

XMLSize_t AbstractDOMParser::getErrorCount | ( |  | ) | const

Get error count from the last parse operation.

This method returns the error count from the last parse operation. Note that this count is actually stored in the scanner, so this method simply returns what the scanner reports.

Returns
  number of errors encountered during the latest parse operation.

## ◆ getExitOnFirstFatalError()

bool AbstractDOMParser::getExitOnFirstFatalError | ( |  | ) | const

Get the 'exit on first error' flag.

This method returns the state of the parser's exit-on-First-Fatal-Error flag. If this flag is true, then the parse will exit the first time it sees any non-wellformed XML or any validity error. The default state is true.

Returns
  true, if the parser is currently configured to exit on the first fatal error, false otherwise.

See also
  setExitOnFirstFatalError

## ◆ getExternalNoNamespaceSchemaLocation()

XMLCh * AbstractDOMParser::getExternalNoNamespaceSchemaLocation | ( |  | ) | const

Get the noNamespace SchemaLocation that is specified externally.

This method returns the no target namespace XML Schema Location that was specified using setExternalNoNamespaceSchemaLocation.

The parser owns the returned string, and the memory allocated for the returned string will be destroyed when the parser is deleted.

To ensure accessibility of the returned information after the parser is deleted, callers need to copy and store the returned information somewhere else.

Returns
  a pointer to the no target namespace Schema Location that was specified externally. The pointer spans the same life-time as the parser. A null pointer is returned if nothing was specified externally.

See also
  setExternalNoNamespaceSchemaLocation(const XMLCh* const)

## ◆ getExternalSchemaLocation()

XMLCh * AbstractDOMParser::getExternalSchemaLocation | ( |  | ) | const

Get the set of Namespace/SchemaLocation that is specified externally.

This method returns the list of Namespace/SchemaLocation that was specified using setExternalSchemaLocation.

The parser owns the returned string, and the memory allocated for the returned string will be destroyed when the parser is deleted.

To ensure accessibility of the returned information after the parser is deleted, callers need to copy and store the returned information somewhere else.

Returns
  a pointer to the list of Namespace/SchemaLocation that was specified externally. The pointer spans the same life-time as the parser. A null pointer is returned if nothing was specified externally.

See also
  setExternalSchemaLocation(const XMLCh* const)

## ◆ getGenerateSyntheticAnnotations()

bool AbstractDOMParser::getGenerateSyntheticAnnotations | ( |  | ) | const

Get the 'generate synthetic annotations' flag.

Returns
  true, if the parser is currently configured to generate synthetic annotations, false otherwise. A synthetic XSAnnotation is created when a schema component has non-schema attributes but has no child annotations so that the non-schema attributes can be recovered under PSVI.

See also
  setGenerateSyntheticAnnotations

## ◆ getGrammarResolver()

GrammarResolver * AbstractDOMParser::getGrammarResolver | ( |  | ) | const
| protected

Get the Grammar resolver.

This provides derived classes with access to the grammar resolver.

References fGrammarResolver.

## ◆ getHandleMultipleImports()

bool AbstractDOMParser::getHandleMultipleImports | ( |  | ) | const

Get the 'handle multiple schema imports' flag.

Returns
  true, if the parser is currently configured to import multiple schemas with the same namespace, false otherwise.

See also
  setHandleMultipleImports

## ◆ getIdentityConstraintChecking()

bool AbstractDOMParser::getIdentityConstraintChecking | ( |  | ) | const

Get the identity constraint checking' flag.

This method returns the state of the parser's identity constraint checking flag.

Returns
  true, if the parser is currently configured to have identity constraint checking, false otherwise.

See also
  setIdentityConstraintChecking

## ◆ getIgnoreAnnotations()

bool AbstractDOMParser::getIgnoreAnnotations | ( |  | ) | const

Get the 'ignore annotations' flag.

Returns
  true, if the parser is currently configured to ignore annotations, false otherwise.

See also
  setIgnoreAnnotations

## ◆ getIncludeIgnorableWhitespace()

bool AbstractDOMParser::getIncludeIgnorableWhitespace | ( |  | ) | const

Get the 'include ignorable whitespace' flag.

This method returns the state of the parser's include ignorable whitespace flag.

Returns
  'true' if the include ignorable whitespace flag is set on the parser, 'false' otherwise.

See also
  setIncludeIgnorableWhitespace

References fIncludeIgnorableWhitespace.

## ◆ getLoadExternalDTD()

bool AbstractDOMParser::getLoadExternalDTD | ( |  | ) | const

Get the 'Loading External DTD' flag.

This method returns the state of the parser's loading external DTD flag.

Returns
  false, if the parser is currently configured to ignore external DTD completely, true otherwise.

See also
  setLoadExternalDTD
  getDisallowDoctype
  getValidationScheme

## ◆ getLoadSchema()

bool AbstractDOMParser::getLoadSchema | ( |  | ) | const

Get the 'Loading Schema' flag.

This method returns the state of the parser's loading schema flag.

Returns
  true, if the parser is currently configured to automatically load schemas that are not in the grammar pool, false otherwise.

See also
  setLoadSchema

## ◆ getLowWaterMark()

const XMLSize_t & AbstractDOMParser::getLowWaterMark | ( |  | ) | const

Get the raw buffer low water mark for this parser.

If the number of available bytes in the raw buffer is less than the low water mark the parser will attempt to read more data before continuing parsing. By default the value for this parameter is 100 bytes. You may want to set this parameter to 0 if you would like the parser to parse the available data immediately without potentially blocking while waiting for more date.

Returns
  current low water mark

See also
  setSecurityManager

## ◆ getMemoryManager()

MemoryManager * AbstractDOMParser::getMemoryManager | ( |  | ) | const
| protected

References fMemoryManager.

## ◆ getParseInProgress()

bool AbstractDOMParser::getParseInProgress | ( |  | ) | const
| protected

Get the parse in progress flag.

This provides derived classes with access to the parse in progress flag.

References fParseInProgress.

## ◆ getPSVIHandler() [1/2]

PSVIHandler * AbstractDOMParser::getPSVIHandler | ( |  | ) |

This method returns the installed PSVI handler.

Suitable for 'lvalue' usages.

Returns
  The pointer to the installed PSVI handler object.

References fPSVIHandler.

## ◆ getPSVIHandler() [2/2]

const PSVIHandler * AbstractDOMParser::getPSVIHandler | ( |  | ) | const

This method returns the installed PSVI handler.

Suitable for 'rvalue' usages.

Returns
  A const pointer to the installed PSVI handler object.

References fPSVIHandler.

## ◆ getScanner()

XMLScanner * AbstractDOMParser::getScanner | ( |  | ) | const
| protected

Get the XML scanner.

This provides derived classes with access to the XML scanner.

References fScanner.

## ◆ getSecurityManager()

SecurityManager * AbstractDOMParser::getSecurityManager | ( |  | ) | const

Get the SecurityManager instance attached to this parser.

This method returns the security manager that was specified using setSecurityManager.

The SecurityManager instance must have been specified by the application; this should not be deleted until after the parser has been deleted (or a new SecurityManager instance has been supplied to the parser).

Returns
  a pointer to the SecurityManager instance specified externally. A null pointer is returned if nothing was specified externally.

See also
  setSecurityManager

## ◆ getSkipDTDValidation()

bool AbstractDOMParser::getSkipDTDValidation | ( |  | ) | const

Get the 'skip DTD validation' flag.

Returns
  true, if the parser is currently configured to skip DTD validation, false otherwise.

See also
  setSkipDTDValidation

## ◆ getStandardUriConformant()

bool AbstractDOMParser::getStandardUriConformant | ( |  | ) | const

Get the 'force standard uri flag'.

This method returns the state if the parser forces standard uri

Returns
  true, if the parser is currently configured to force standard uri, i.e. malformed uri will be rejected.

See also
  setStandardUriConformant

## ◆ getValidateAnnotations()

bool AbstractDOMParser::getValidateAnnotations | ( |  | ) | const

Get the 'validate annotations' flag.

Returns
  true, if the parser is currently configured to validate annotations, false otherwise.

See also
  setValidateAnnotations

## ◆ getValidationConstraintFatal()

bool AbstractDOMParser::getValidationConstraintFatal | ( |  | ) | const

This method returns the state of the parser's validation-constraint-fatal flag.

Returns
  true, if the parser is currently configured to set validation constraint errors as fatal, false otherwise.

See also
  setValidationConstraintFatal

## ◆ getValidationSchemaFullChecking()

bool AbstractDOMParser::getValidationSchemaFullChecking | ( |  | ) | const

Get the 'full schema constraint checking' flag.

This method returns the state of the parser's full schema constraint checking flag.

Returns
  true, if the parser is currently configured to have full schema constraint checking, false otherwise.

See also
  setValidationSchemaFullChecking

## ◆ getValidationScheme()

ValSchemes AbstractDOMParser::getValidationScheme | ( |  | ) | const

This method returns an enumerated value that indicates the current validation scheme set on this parser.

Returns
  The ValSchemes value current set on this parser.

See also
  setValidationScheme

## ◆ getValidator()

const XMLValidator & AbstractDOMParser::getValidator | ( |  | ) | const

Get a const reference to the validator.

This method returns a reference to the parser's installed validator.

Returns
  A const reference to the installed validator object.

## ◆ handleAttributesPSVI()

virtual void AbstractDOMParser::handleAttributesPSVI | ( | const XMLCh *const | localName,
|  | const XMLCh *const | uri,
|  | PSVIAttributeList * | psviAttributes )
| virtual

Enables PSVI information about attributes to be passed back to the application.

This callback will be made on all elements; on elements with no attributes, the final parameter will be null.

Parameters

  localName | The name of the element upon which start tag these attributes were encountered.
  uri | The namespace to which the element is bound
  psviAttributes | Object containing the attributes' PSVI properties with information to identify them.

Implements PSVIHandler.

## ◆ handleElementPSVI()

virtual void AbstractDOMParser::handleElementPSVI | ( | const XMLCh *const | localName,
|  | const XMLCh *const | uri,
|  | PSVIElement * | elementInfo )
| virtual

Receive notification of the PSVI properties of an element.

The scanner will issue this call after the XMLDocumentHandler endElement call. Since the scanner will issue the psviAttributes call immediately after reading the start tag of an element, all element content will be effectively bracketed by these two calls.

Parameters

  localName | The name of the element whose end tag was just parsed.
  uri | The namespace to which the element is bound
  elementInfo | Object containing the element's PSVI properties

Implements PSVIHandler.

## ◆ handlePartialElementPSVI()

virtual void AbstractDOMParser::handlePartialElementPSVI | ( | const XMLCh *const | localName,
|  | const XMLCh *const | uri,
|  | PSVIElement * | elementInfo )
| virtual

Receive notification of partial PSVI properties of an element.

This callback is made right after the psviAttributes call for non-empty element.

The PSVIElement passed in has all fields properly set and it can be safely accessed the same way as the one passed in handleElementPSVI. However, fields listed below always have default values.

getValidity() PSVIItem::VALIDITY_NOTKNOWN getValidationAttemped() PSVIItem::VALIDATION_NONE getMemberTypeDefinition() 0 getSchemaNormalizedValue() 0 getCanonicalRepresentation() 0 getNotationDeclaration() 0

Parameters

  localName | The name of the element upon which start tag these attributes were encountered.
  uri | The namespace to which the element is bound
  elementInfo | Object containing the element's partial PSVI properties

Reimplemented from PSVIHandler.

## ◆ ignorableWhitespace()

virtual void AbstractDOMParser::ignorableWhitespace | ( | const XMLCh *const | chars,
|  | const XMLSize_t | length,
|  | const bool | cdataSection )
| virtual

Handle an ignorable whitespace vent.

This method is used to report all the whitespace characters, which are determined to be 'ignorable'. This distinction between characters is only made, if validation is enabled.

Any whitespace before content is ignored. If the current node is already of type DOMNode::TEXT_NODE, then these whitespaces are appended, otherwise a new Text node is created which stores this data. Essentially all contiguous ignorable characters are collected in one node.

Parameters

  chars | A const pointer to a Unicode string representing the ignorable whitespace character data.
  length | The length of the Unicode string 'chars'.
  cdataSection | A flag indicating if the characters represent content from the CDATA section.

Implements XMLDocumentHandler.

## ◆ isDocumentAdopted()

bool AbstractDOMParser::isDocumentAdopted | ( |  | ) | const
| protected

Returns true if the user has adopted the document.

## ◆ notationDecl()

virtual void AbstractDOMParser::notationDecl | ( | const XMLNotationDecl & | notDecl,
|  | const bool | isIgnored )
| virtual

## ◆ parse() [1/3]

void AbstractDOMParser::parse | ( | const char *const | systemId | ) |

Parse via a file path or URL (in the local code page)

This method invokes the parsing process on the XML file specified by the native char* string parameter 'systemId'.

Parameters

  systemId | A const char pointer to a native string which contains the path to the XML file to be parsed.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.
  XMLException | An exception from the parser or client handler code.
  DOMException | A DOM exception as per DOM spec.

See also
  #parse(InputSource,...)

## ◆ parse() [2/3]

void AbstractDOMParser::parse | ( | const InputSource & | source | ) |

Parse via an input source object.

This method invokes the parsing process on the XML file specified by the InputSource parameter. This API is borrowed from the SAX Parser interface.

Parameters

  source | A const reference to the InputSource object which points to the XML file to be parsed.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.
  XMLException | An exception from the parser or client handler code.
  DOMException | A DOM exception as per DOM spec.

See also
  InputSource::InputSource

## ◆ parse() [3/3]

void AbstractDOMParser::parse | ( | const XMLCh *const | systemId | ) |

Parse via a file path or URL.

This method invokes the parsing process on the XML file specified by the Unicode string parameter 'systemId'. This method is borrowed from the SAX Parser interface.

Parameters

  systemId | A const XMLCh pointer to the Unicode string which contains the path to the XML file to be parsed.

Exceptions

  SAXException | Any SAX exception, possibly wrapping another exception.
  XMLException | An exception from the parser or client handler code.
  DOMException | A DOM exception as per DOM spec.

See also
  #parse(InputSource,...)

## ◆ parseFirst() [1/3]

bool AbstractDOMParser::parseFirst | ( | const char *const | systemId,
|  | XMLPScanToken & | toFill )

Begin a progressive parse operation.

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.

Parameters

  systemId | A pointer to a regular native string representing the path to the XML file to be parsed.
  toFill | A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.

Returns
  'true', if successful in parsing the prolog. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not parse the prolog.

See also
  parseNext
  #parseFirst(XMLCh*,...)
  #parseFirst(InputSource&,...)

## ◆ parseFirst() [2/3]

bool AbstractDOMParser::parseFirst | ( | const InputSource & | source,
|  | XMLPScanToken & | toFill )

Begin a progressive parse operation.

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.

Parameters

  source | A const reference to the InputSource object which points to the XML file to be parsed.
  toFill | A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.

Returns
  'true', if successful in parsing the prolog. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not parse the prolog.

See also
  parseNext
  #parseFirst(XMLCh*,...)
  #parseFirst(char*,...)

## ◆ parseFirst() [3/3]

bool AbstractDOMParser::parseFirst | ( | const XMLCh *const | systemId,
|  | XMLPScanToken & | toFill )

Begin a progressive parse operation.

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.

Parameters

  systemId | A pointer to a Unicode string representing the path to the XML file to be parsed.
  toFill | A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.

Returns
  'true', if successful in parsing the prolog. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not parse the prolog.

See also
  parseNext
  #parseFirst(char*,...)
  #parseFirst(InputSource&,...)

## ◆ parseNext()

bool AbstractDOMParser::parseNext | ( | XMLPScanToken & | token | ) |

Continue a progressive parse operation.

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).

Parameters

  token | A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.

Returns
  'true', if successful in parsing the next XML token. It indicates the user can go ahead with parsing the rest of the file. It returns 'false' to indicate that the parser could not find next token as per the XML specification production rule.

See also
  #parseFirst(XMLCh*,...)
  #parseFirst(char*,...)
  #parseFirst(InputSource&,...)

## ◆ parseReset()

void AbstractDOMParser::parseReset | ( | XMLPScanToken & | token | ) |

Reset the parser after a progressive parse.

If a progressive parse loop exits before the end of the document is reached, the parser has no way of knowing this. So it will leave open any files or sockets or memory buffers that were in use at the time that the parse loop exited.

The next parse operation will cause these open files and such to be closed, but the next parse operation might occur at some unknown future point. To avoid this problem, you should reset the parser if you exit the loop early.

If you exited because of an error, then this cleanup will be done for you. Its only when you exit the file prematurely of your own accord, because you've found what you wanted in the file most likely.

Parameters

  token | A token maintaing state information to maintain internal consistency between invocation of 'parseNext' calls.

See also
  #parseFirst(XMLCh*,...)
  #parseFirst(char*,...)
  #parseFirst(InputSource&,...)

## ◆ reset()

void AbstractDOMParser::reset | ( |  | ) |

Reset the parser.

This method resets the state of the DOM driver and makes it ready for a fresh parse run.

## ◆ resetDocType()

virtual void AbstractDOMParser::resetDocType | ( |  | ) |
| virtual

## ◆ resetDocument()

virtual void AbstractDOMParser::resetDocument | ( |  | ) |
| virtual

Handle a document reset event.

This method allows the user installed Document Handler to 'reset' itself, freeing all the memory resources. The scanner calls this method before starting a new parse event.

Implements XMLDocumentHandler.

## ◆ resetPool()

void AbstractDOMParser::resetPool | ( |  | ) |
| protected

## ◆ setCalculateSrcOfs()

void AbstractDOMParser::setCalculateSrcOfs | ( | const bool | newState | ) |

Enable/disable src offset calculation.

This method allows users to enable/disable src offset calculation. Disabling the calculation will improve performance.

The parser's default state is: false.

Parameters

  newState | The value specifying whether we should enable or disable src offset calculation

See also
  getCalculateSrcOfs

## ◆ setCreateCommentNodes()

void AbstractDOMParser::setCreateCommentNodes | ( | const bool | create | ) |

Set the 'create comment nodes' flag.

This method allows the user to specify whether the parser should create comment nodes in the DOM tree being produced.

The default value is 'true'.

Parameters

  create | The new state of the create comment nodes flag.

See also
  getCreateCommentNodes

References fCreateCommentNodes.

## ◆ setCreateEntityReferenceNodes()

void AbstractDOMParser::setCreateEntityReferenceNodes | ( | const bool | create | ) |

Set the 'include entity references' flag.

This method allows the user to specify whether the parser should create entity reference nodes in the DOM tree being produced. When the 'create' flag is true, the parser will create EntityReference nodes in the DOM tree. The EntityReference nodes and their child nodes will be read-only. When the 'create' flag is false, no EntityReference nodes will be created.

The replacement text of the entity is included in either case, either as a child of the Entity Reference node or in place at the location of the reference.

The default value is 'true'.

Parameters

  create | The new state of the create entity reference nodes flag.

See also
  getCreateEntityReferenceNodes

References fCreateEntityReferenceNodes.

## ◆ setCreateSchemaInfo()

void AbstractDOMParser::setCreateSchemaInfo | ( | const bool | newState | ) |

Set the 'associate schema info' flag.

This method allows users to specify whether the parser should store schema informations in the element and attribute nodes in the DOM tree being produced.

Parameters

  newState | The state to set

See also
  getCreateSchemaInfo

## ◆ setCurrentNode()

void AbstractDOMParser::setCurrentNode | ( | DOMNode * | toSet | ) |
| protected

Set the current DOM node.

This method sets the current node maintained inside the parser to the one specified.

Parameters

  toSet | The DOM node which will be the current node.

References fCurrentNode.

## ◆ setDisableDefaultEntityResolution()

void AbstractDOMParser::setDisableDefaultEntityResolution | ( | const bool | newValue | ) |

Set the 'disable default entity resolution' flag.

This method gives users the option to not perform default entity resolution. If the user's resolveEntity method returns NULL the parser will try to resolve the entity on its own. When this option is set to true, the parser will not attempt to resolve the entity when the resolveEntity method returns NULL.

The parser's default state is false

Parameters

  newValue | The state to set

See also
  EntityResolver

## ◆ setDisallowDoctype()

void AbstractDOMParser::setDisallowDoctype | ( | const bool | newState | ) |

Set the 'Disallow DOCTYPE (DTD)' flag.

This method allows users to disable the processing of DOCTYPE (DTD). When set to true, the parser will throw an exception if the document contains the DOCTYPE node.

The parser's default state is: false.

Parameters

  newState | The value specifying whether to disallow DOCTYPE or not.

See also
  setDisallowDoctype()
  getLoadExternalDTD
  getValidationScheme

## ◆ setDocument()

void AbstractDOMParser::setDocument | ( | DOMDocument * | toSet | ) |
| protected

Set the document node.

This method sets the DOM Document node to the one specified.

Parameters

  toSet | The new DOM Document node for this XML document.

## ◆ setDoNamespaces()

void AbstractDOMParser::setDoNamespaces | ( | const bool | newState | ) |

Set the 'do namespaces' flag.

This method allows users to enable or disable the parser's namespace processing. When set to true, parser starts enforcing all the constraints and rules specified by the NameSpace specification.

The parser's default state is: false.

Parameters

  newState | The value specifying whether NameSpace rules should be enforced or not.

See also
  getDoNamespaces

## ◆ setDoSchema()

void AbstractDOMParser::setDoSchema | ( | const bool | newState | ) |

Set the 'do schema' flag.

This method allows users to enable or disable the parser's schema processing. When set to false, parser will not process any schema found.

The parser's default state is: false.

Note: If set to true, namespace processing must also be turned on.

Parameters

  newState | The value specifying whether schema support should be enforced or not.

See also
  getDoSchema

## ◆ setDoXInclude()

void AbstractDOMParser::setDoXInclude | ( | const bool | newState | ) |

Set the 'do XInclude' flag.

This method allows users to specify whether the parser should process XInclude nodes in the DOM tree being produced.

Parameters

  newState | The state to set

See also
  getDoXInclude

References fDoXInclude.

## ◆ setExitOnFirstFatalError()

void AbstractDOMParser::setExitOnFirstFatalError | ( | const bool | newState | ) |

Set the 'exit on first error' flag.

This method allows users to set the parser's behaviour when it encounters the first fatal error. If set to true, the parser will exit at the first fatal error. If false, then it will report the error and continue processing.

The default value is 'true' and the parser exits on the first fatal error.

Parameters

  newState | The value specifying whether the parser should continue or exit when it encounters the first fatal error.

See also
  getExitOnFirstFatalError

## ◆ setExternalNoNamespaceSchemaLocation() [1/2]

void AbstractDOMParser::setExternalNoNamespaceSchemaLocation | ( | const char *const | noNamespaceSchemaLocation | ) |

This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).

It takes native char string as parameter

Parameters

  noNamespaceSchemaLocation | the XML Schema Location with no target namespace

See also
  setExternalNoNamespaceSchemaLocation(const XMLCh* const)

## ◆ setExternalNoNamespaceSchemaLocation() [2/2]

void AbstractDOMParser::setExternalNoNamespaceSchemaLocation | ( | const XMLCh *const | noNamespaceSchemaLocation | ) |

This method allows the user to specify the no target namespace XML Schema Location externally.

If specified, the instance document's noNamespaceSchemaLocation attribute will be effectively ignored.

If this method is called more than once, only the last one takes effect.

The syntax is the same as for the noNamespaceSchemaLocation attribute that may occur in an instance document: e.g."file_name.xsd".

Parameters

  noNamespaceSchemaLocation | the XML Schema Location with no target namespace

See also
  getExternalNoNamespaceSchemaLocation

## ◆ setExternalSchemaLocation() [1/2]

void AbstractDOMParser::setExternalSchemaLocation | ( | const char *const | schemaLocation | ) |

This method is same as setExternalSchemaLocation(const XMLCh* const).

It takes native char string as parameter

Parameters

  schemaLocation | the list of schemas to use

See also
  setExternalSchemaLocation(const XMLCh* const)

## ◆ setExternalSchemaLocation() [2/2]

void AbstractDOMParser::setExternalSchemaLocation | ( | const XMLCh *const | schemaLocation | ) |

This method allows the user to specify a list of schemas to use.

If the targetNamespace of a schema specified using this method matches the targetNamespace of a schema occurring in the instance document in the schemaLocation attribute, or if the targetNamespace matches the namespace attribute of the "import" element, the schema specified by the user using this method will be used (i.e., the schemaLocation attribute in the instance document or on the "import" element will be effectively ignored).

If this method is called more than once, only the last one takes effect.

The syntax is the same as for schemaLocation attributes in instance documents: e.g, "http://www.example.com file_name.xsd". The user can specify more than one XML Schema in the list.

Parameters

  schemaLocation | the list of schemas to use

See also
  getExternalSchemaLocation

## ◆ setGenerateSyntheticAnnotations()

void AbstractDOMParser::setGenerateSyntheticAnnotations | ( | const bool | newValue | ) |

set the 'generate synthetic annotations' flag

Parameters

  newValue | The value for specifying whether Synthetic Annotations should be generated or not. A synthetic XSAnnotation is created when a schema component has non-schema attributes but has no child annotations so that the non-schema attributes can be recovered under PSVI.

See also
  getGenerateSyntheticAnnotations

## ◆ setHandleMultipleImports()

void AbstractDOMParser::setHandleMultipleImports | ( | const bool | newValue | ) |

Set the 'handle multiple schema imports' flag.

This method gives users the ability to import multiple schemas that have the same namespace.

NOTE: This option is ignored if schema validation is disabled.

The parser's default state is false

Parameters

  newValue | The state to set

## ◆ setIdentityConstraintChecking()

void AbstractDOMParser::setIdentityConstraintChecking | ( | const bool | newState | ) |

This method allows users to enable or disable the parser's identity constraint checks.

By default, the parser does identity constraint checks. The default value is true.

Parameters

  newState | The value specifying whether the parser should do identity constraint checks or not in the input XML document.

See also
  getIdentityConstraintChecking

## ◆ setIgnoreAnnotations()

void AbstractDOMParser::setIgnoreAnnotations | ( | const bool | newValue | ) |

Set the 'ignore annotation' flag.

This method gives users the option to not generate XSAnnotations when "traversing" a schema.

The parser's default state is false

Parameters

  newValue | The state to set

## ◆ setIncludeIgnorableWhitespace()

void AbstractDOMParser::setIncludeIgnorableWhitespace | ( | const bool | include | ) |

Set the 'include ignorable whitespace' flag.

This method allows the user to specify whether a validating parser should include ignorable whitespaces as text nodes. It has no effect on non-validating parsers which always include non-markup text.

When set to true (also the default), ignorable whitespaces will be added to the DOM tree as text nodes. The method DOMText::isIgnorableWhitespace() will return true for those text nodes only.

When set to false, all ignorable whitespace will be discarded and no text node is added to the DOM tree. Note: applications intended to process the "xml:space" attribute should not set this flag to false. And this flag also overrides any schema datateye whitespace facets, that is, all ignorable whitespace will be discarded even though 'preserve' is set in schema datatype whitespace facets.

Parameters

  include | The new state of the include ignorable whitespace flag.

See also
  getIncludeIgnorableWhitespace

References fIncludeIgnorableWhitespace.

## ◆ setLoadExternalDTD()

void AbstractDOMParser::setLoadExternalDTD | ( | const bool | newState | ) |

Set the 'Loading External DTD' flag.

This method allows users to enable or disable the loading of external DTD. When set to false, the parser will ignore any external DTD completely if the validationScheme is set to Val_Never.

The parser's default state is: true.

This flag is ignored if the validationScheme is set to Val_Always or Val_Auto.

Parameters

  newState | The value specifying whether external DTD should be loaded or not.

See also
  getLoadExternalDTD
  setDisallowDoctype
  setValidationScheme

## ◆ setLoadSchema()

void AbstractDOMParser::setLoadSchema | ( | const bool | newState | ) |

Set the 'Loading Schema' flag.

This method allows users to enable or disable the loading of schemas. When set to false, the parser not attempt to load schemas beyond querying the grammar pool for them.

The parser's default state is: true.

Parameters

  newState | The value specifying whether schemas should be loaded if they're not found in the grammar pool.

See also
  getLoadSchema
  setDoSchema

## ◆ setLowWaterMark()

void AbstractDOMParser::setLowWaterMark | ( | XMLSize_t | lwm | ) |

Set the raw buffer low water mark for this parser.

If the number of available bytes in the raw buffer is less than the low water mark the parser will attempt to read more data before continuing parsing. By default the value for this parameter is 100 bytes. You may want to set this parameter to 0 if you would like the parser to parse the available data immediately without potentially blocking while waiting for more date.

Parameters

  lwm | new low water mark

See also
  getSecurityManager

## ◆ setParseInProgress()

void AbstractDOMParser::setParseInProgress | ( | const bool | toSet | ) |
| protected

Set the parse in progress flag.

This method sets the parse in progress flag to true or false.

Parameters

  toSet | The value of the flag to be set.

References fParseInProgress.

## ◆ setPSVIHandler()

virtual void AbstractDOMParser::setPSVIHandler | ( | PSVIHandler *const | handler | ) |
| virtual

This method installs the user specified PSVI handler on the parser.

Parameters

  handler | A pointer to the PSVI handler to be called when the parser comes across 'PSVI' events as per the schema specification.

## ◆ setSecurityManager()

void AbstractDOMParser::setSecurityManager | ( | SecurityManager *const | securityManager | ) |

This allows an application to set a SecurityManager on the parser; this object stores information that various components use to limit their consumption of system resources while processing documents.

If this method is called more than once, only the last one takes effect. It may not be reset during a parse.

Parameters

  securityManager | the SecurityManager instance to be used by this parser

See also
  getSecurityManager

## ◆ setSkipDTDValidation()

void AbstractDOMParser::setSkipDTDValidation | ( | const bool | newValue | ) |

Set the 'skip DTD validation' flag.

This method gives users the option to skip DTD validation only when schema validation is on (i.e. when performing validation, we will ignore the DTD, except for entities, when schema validation is enabled).

NOTE: This option is ignored if schema validation is disabled.

The parser's default state is false

Parameters

  newValue | The state to set

## ◆ setStandardUriConformant()

void AbstractDOMParser::setStandardUriConformant | ( | const bool | newState | ) |

Force standard uri.

This method allows users to tell the parser to force standard uri conformance.

The parser's default state is: false.

Parameters

  newState | The value specifying whether the parser should reject malformed URI.

See also
  getStandardUriConformant

## ◆ setValidateAnnotations()

void AbstractDOMParser::setValidateAnnotations | ( | const bool | newValue | ) |

set the 'validlate annotations' flag

Parameters

  newValue | The value for specifying whether Annotations should be validated or not.

See also
  getValidateAnnotations

## ◆ setValidationConstraintFatal()

void AbstractDOMParser::setValidationConstraintFatal | ( | const bool | newState | ) |

This method allows users to set the parser's behaviour when it encounters a validation constraint error.

If set to true, and the the parser will treat validation error as fatal and will exit depends on the state of "getExitOnFirstFatalError". If false, then it will report the error and continue processing.

Note: setting this true does not mean the validation error will be printed with the word "Fatal Error". It is still printed as "Error", but the parser will exit if "setExitOnFirstFatalError" is set to true.

The default value is 'false'.

Parameters

  newState | If true, the parser will exit if "setExitOnFirstFatalError" is set to true.

See also
  getValidationConstraintFatal
  setExitOnFirstFatalError

## ◆ setValidationSchemaFullChecking()

void AbstractDOMParser::setValidationSchemaFullChecking | ( | const bool | schemaFullChecking | ) |

This method allows the user to turn full Schema constraint checking on/off.

Only takes effect if Schema validation is enabled. If turned off, partial constraint checking is done.

Full schema constraint checking includes those checking that may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.

The parser's default state is: false.

Parameters

  schemaFullChecking | True to turn on full schema constraint checking.

See also
  getValidationSchemaFullChecking

## ◆ setValidationScheme()

void AbstractDOMParser::setValidationScheme | ( | const ValSchemes | newScheme | ) |

This method allows users to set the validation scheme to be used by this parser.

The value is one of the ValSchemes enumerated values defined by this class:

Val_Never - turn off validation
Val_Always - turn on validation
Val_Auto - turn on validation if any internal/external DTD subset have been seen

The parser's default state is: Val_Never.

Parameters

  newScheme | The new validation scheme to use.

See also
  getValidationScheme

## ◆ startAttList()

virtual void AbstractDOMParser::startAttList | ( | const DTDElementDecl & | elemDecl | ) |
| virtual

## ◆ startDocument()

virtual void AbstractDOMParser::startDocument | ( |  | ) |
| virtual

Handle a start document event.

This method is used to report the start of the parsing process.

Implements XMLDocumentHandler.

## ◆ startElement()

virtual void AbstractDOMParser::startElement | ( | const XMLElementDecl & | elemDecl,
|  | const unsigned int | urlId,
|  | const XMLCh *const | elemPrefix,
|  | const RefVectorOf< XMLAttr > & | attrList,
|  | const XMLSize_t | attrCount,
|  | const bool | isEmpty,
|  | const bool | isRoot )
| virtual

Handle a start element event.

This method is used to report the start of an element. It is called at the end of the element, by which time all attributes specified are also parsed. A new DOM Element node is created along with as many attribute nodes as required. This new element is added appended as a child of the current node in the tree, and then replaces it as the current node (if the isEmpty flag is false.)

Parameters

  elemDecl | A const reference to the object containing element declaration information.
  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. If empty, then no endElement() call will be made.
  isRoot | A flag indicating whether this element was the root element.

See also
  DocumentHandler::startElement

Implements XMLDocumentHandler.

## ◆ startEntityReference()

virtual void AbstractDOMParser::startEntityReference | ( | const XMLEntityDecl & | entDecl | ) |
| virtual

Handle a start entity reference event.

This method is used to indicate the start of an entity reference. If the expand entity reference flag is true, then a new DOM Entity reference node is created.

Parameters

  entDecl | A const reference to the object containing the entity declaration information.

Implements XMLDocumentHandler.

## ◆ startExtSubset()

virtual void AbstractDOMParser::startExtSubset | ( |  | ) |
| virtual

## ◆ startIntSubset()

virtual void AbstractDOMParser::startIntSubset | ( |  | ) |
| virtual

## ◆ TextDecl()

virtual void AbstractDOMParser::TextDecl | ( | const XMLCh *const | versionStr,
|  | const XMLCh *const | encodingStr )
| virtual

## ◆ useImplementation()

void AbstractDOMParser::useImplementation | ( | const XMLCh *const | implementationFeatures | ) |

Set the implementation to use when creating the document.

This method allows users to set the implementation to use to create the document when parseing.

Parameters

  implementationFeatures | The names of the desired features the implementation should have.

References MemoryManager::deallocate(), fImplementationFeatures, fMemoryManager, and XMLString::replicate().

## ◆ useScanner()

void AbstractDOMParser::useScanner | ( | const XMLCh *const | scannerName | ) |

Set the scanner to use when scanning the XML document.

This method allows users to set the scanner to use when scanning a given XML document.

Parameters

  scannerName | The name of the desired scanner

## ◆ XMLDecl()

virtual void AbstractDOMParser::XMLDecl | ( | const XMLCh *const | versionStr,
|  | const XMLCh *const | encodingStr,
|  | const XMLCh *const | standaloneStr,
|  | const XMLCh *const | actualEncStr )
| virtual

Handle an XMLDecl event.

This method is used to report the XML decl scanned by the parser. Refer to the XML specification to see the meaning of parameters.

This method is a no-op for this DOM implementation.

Parameters

  versionStr | A const pointer to a Unicode string representing version string value.
  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.
  actualEncStr | A const pointer to a Unicode string representing the actual encoding string value.

Implements XMLDocumentHandler.

## Member Data Documentation

## ◆ fBufMgr

XMLBufferMgr AbstractDOMParser::fBufMgr
| protected

## ◆ fCreateCommentNodes

bool AbstractDOMParser::fCreateCommentNodes
| protected

Referenced by getCreateCommentNodes(), and setCreateCommentNodes().

## ◆ fCreateEntityReferenceNodes

bool AbstractDOMParser::fCreateEntityReferenceNodes
| protected

Referenced by getCreateEntityReferenceNodes(), and setCreateEntityReferenceNodes().

## ◆ fCreateSchemaInfo

bool AbstractDOMParser::fCreateSchemaInfo
| protected

Referenced by getCreateSchemaInfo().

## ◆ fCurrentEntity

DOMEntityImpl* AbstractDOMParser::fCurrentEntity
| protected

## ◆ fCurrentNode

DOMNode* AbstractDOMParser::fCurrentNode
| protected

Referenced by getCurrentNode(), and setCurrentNode().

## ◆ fCurrentParent

DOMNode* AbstractDOMParser::fCurrentParent
| protected

## ◆ fDocument

DOMDocumentImpl* AbstractDOMParser::fDocument
| protected

## ◆ fDocumentAdoptedByUser

bool AbstractDOMParser::fDocumentAdoptedByUser
| protected

## ◆ fDocumentType

DOMDocumentTypeImpl* AbstractDOMParser::fDocumentType
| protected

## ◆ fDocumentVector

RefVectorOf<DOMDocumentImpl>* AbstractDOMParser::fDocumentVector
| protected

## ◆ fDoXInclude

bool AbstractDOMParser::fDoXInclude
| protected

Referenced by getDoXInclude(), and setDoXInclude().

## ◆ fGrammarPool

XMLGrammarPool* AbstractDOMParser::fGrammarPool
| protected

## ◆ fGrammarResolver

GrammarResolver* AbstractDOMParser::fGrammarResolver
| protected

Referenced by getGrammarResolver().

## ◆ fImplementationFeatures

XMLCh* AbstractDOMParser::fImplementationFeatures
| protected

Referenced by useImplementation().

## ◆ fIncludeIgnorableWhitespace

bool AbstractDOMParser::fIncludeIgnorableWhitespace
| protected

Referenced by getIncludeIgnorableWhitespace(), and setIncludeIgnorableWhitespace().

## ◆ fInternalSubset

XMLBuffer& AbstractDOMParser::fInternalSubset
| protected

## ◆ fMemoryManager

MemoryManager* AbstractDOMParser::fMemoryManager
| protected

Referenced by getMemoryManager(), and useImplementation().

## ◆ fParseInProgress

bool AbstractDOMParser::fParseInProgress
| protected

Referenced by getParseInProgress(), and setParseInProgress().

## ◆ fPSVIHandler

PSVIHandler* AbstractDOMParser::fPSVIHandler
| protected

Referenced by getPSVIHandler(), and getPSVIHandler().

## ◆ fScanner

XMLScanner* AbstractDOMParser::fScanner
| protected

Referenced by getScanner().

## ◆ fURIStringPool

XMLStringPool* AbstractDOMParser::fURIStringPool
| protected

## ◆ fValidator

XMLValidator* AbstractDOMParser::fValidator
| protected

## ◆ fWithinElement

bool AbstractDOMParser::fWithinElement
| protected

The documentation for this class was generated from the following file:

- AbstractDOMParser.hpp