Skip Headers
Oracle® Database XML C++ API Reference
11g Release 1 (11.1)

B28389-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

DOMParser Interface

Table 5-2 summarizes the methods available through the DOMParser interface.

Table 5-2 Summary of DOMParser Methods; Parser Package

Function Summary

getContext()

Returns parser's XML context (allocation and encodings).

getParserId()

Get parser id.

parse()

Parse the document.

parseDTD()

Parse DTD document.

parseSchVal()

Parse and validate the document.

setValidator()

Set the validator for this parser.



getContext()

Each parser object is allocated and executed in a particular Oracle XML context. This member function returns a pointer to this context.

Syntax

virtual Context* getContext() const = 0;

Returns

(Context*) pointer to parser's context


getParserId()

Syntax

virtual DOMParserIdType getParserId() const = 0;

Returns

(DOMParserIdType) Parser Id


parse()

Parses the document and returns the tree root node

Syntax

virtual DocumentRef< Node>* parse(
   InputSource* isrc_ptr,
   boolean DTDvalidate = FALSE,
   DocumentTypeRef< Node>* dtd_ptr = NULL,
   boolean no_mod = FALSE,
   DOMImplementation< Node>* impl_ptr = NULL)
throw (ParserException) = 0;
Parameter Description
isrc_ptr
input source
DTDvalidate
TRUE if validated by DTD
dtd_ptr
DTD reference
no_mod
TRUE if no modifications allowed
impl_ptr
optional DomImplementation pointer

Returns

(DocumentRef) document tree


parseDTD()

Parse DTD document.

Syntax

virtual DocumentRef< Node>* parseDTD(
   InputSource* isrc_ptr,
   boolean no_mod = FALSE,
   DOMImplementation< Node>* impl_ptr = NULL)
throw (ParserException) = 0;
Parameter Description
isrc_ptr
input source
no_mod
TRUE if no modifications allowed
impl_ptr
optional DomImplementation pointer

Returns

(DocumentRef) DTD document tree


parseSchVal()

Parses and validates the document. Sets the validator if the corresponding parameter is not NULL.

Syntax

virtual DocumentRef< Node>* parseSchVal(
   InputSource* src_par,
   boolean no_mod = FALSE,
   DOMImplementation< Node>* impl_ptr = NULL,
   SchemaValidator< Node>* tor_ptr = NULL)
throw (ParserException) = 0;
Parameter Description
isrc_ptr
input source
no_mod
TRUE if no modifications allowed
impl_ptr
optional DomImplementation pointer
tor_ptr
schema validator

Returns

(DocumentRef) document tree


setValidator()

Sets the validator for all validations except when another one is given in parseSchVal

Syntax

virtual void setValidator(
SchemaValidator< Node>* tor_ptr) = 0;
Parameter Description
tor_ptr
schema validator