Oracle® Database XML C++ API Reference 11g Release 1 (11.1) Part Number B28389-01 |
|
|
View PDF |
Table 5-2 summarizes the methods available through the DOMParser
interface.
Table 5-2 Summary of DOMParser Methods; Parser Package
Function | Summary |
---|---|
|
Returns parser's XML context (allocation and encodings). |
|
Get parser id. |
|
Parse the document. |
|
Parse DTD document. |
|
Parse and validate the document. |
|
Set the validator for this parser. |
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
Syntax
virtual DOMParserIdType getParserId() const = 0;
Returns
(DOMParserIdType)
Parser Id
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
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
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
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 |