Oracle® Database XML C++ API Reference 11g Release 1 (11.1) Part Number B28389-01 |
|
|
View PDF |
Table 5-5 summarizes the methods available through the SAXHandler
interface.
Table 5-5 Summary of SAXHandler Methods; Parser Package
Function | Summary |
---|---|
|
Receive notification of CDATA. |
|
Receive notification of an XML declaration. |
|
Receive notification of attribute's declaration. |
|
Receive notification of character data. |
|
Receive notification of a comment. |
|
Receive notification of element's declaration. |
|
Receive notification of the end of the document. |
|
Receive notification of element's end. |
|
Receive notification of a notation declaration. |
|
Receive notification of a parsed entity declaration. |
|
Receive notification of a processing instruction. |
|
Receive notification of the start of the document. |
|
Receive notification of element's start. |
|
Receive namespace aware notification of element's start. |
|
Receive notification of an unparsed entity declaration. |
|
Receive notification of whitespace characters. |
This event handles CDATA, as distinct from Text. The data will be in the data encoding, and the returned length is in characters, not bytes. This is an Oracle extension.
Syntax
virtual void CDATA( oratext* data, ub4 size) = 0;
Parameter | Description |
---|---|
data |
pointer to CDATA |
size |
size of CDATA |
This event marks an XML declaration (XMLDecl
). The startDocument
event is always first; this event will be the second event. The encoding flag says whether an encoding was specified. For the standalone flag, -1 will be returned if it was not specified, otherwise 0
for FALSE
, 1 for TRUE
. This member function is an Oracle extension.
Syntax
virtual void XMLDecl( oratext* version, boolean is_encoding, sword standalone) = 0;
Parameter | Description |
---|---|
version |
version string from XMLDecl |
is_encoding |
whether encoding was specified |
standalone |
value of standalone value flag |
This event marks an attribute declaration in the DTD. It is an Oracle extension; not in SAX standard
Syntax
virtual void attributeDecl( oratext* attr_name, oratext *name, oratext *content) = 0;
Parameter | Description |
---|---|
attr_name |
|
name |
|
content |
body of attribute declaration |
This event marks character data.
Syntax
virtual void characters( oratext* ch, ub4 size) = 0;
Parameter | Description |
---|---|
ch |
pointer to data |
size |
length of data |
This event marks a comment in the XML document. The comment's data will be in the data encoding. It is an Oracle extension, not in SAX standard.
Syntax
virtual void comment( oratext* data) = 0;
Parameter | Description |
---|---|
data |
comment's data |
This event marks an element declaration in the DTD. It is an Oracle extension; not in SAX standard.
Syntax
virtual void elementDecl( oratext *name, oratext *content) = 0;
Parameter | Description |
---|---|
name |
element's name |
content |
element's content |
Receive notification of the end of the document.
Syntax
virtual void endDocument() = 0;
This event marks the end of an element. The name is the tagName
of the element (which may be a qualified name for namespace-aware elements) and is in the data encoding.
Syntax
virtual void endElement( oratext* name) = 0;
The even marks the declaration of a notation in the DTD. The notation's name, public ID, and system ID will all be in the data encoding. Both IDs are optional and may be NULL
.
Syntax
virtual void notationDecl( oratext* name, oratext* public_id, oratext* system_id) = 0;
Parameter | Description |
---|---|
name |
notations's name |
public_id |
notation's public Id |
sysem_id |
notation's system Id |
Marks a parsed entity declaration in the DTD. The parsed entity's name, public ID, system ID, and notation name will all be in the data encoding. This is an Oracle extension.
Syntax
virtual void parsedEntityDecl( oratext* name, oratext* value, oratext* public_id, oratext* system_id, boolean general) = 0;
Parameter | Description |
---|---|
name |
entity's name |
value |
entity's value if internal |
public_id |
entity's public Id |
sysem_id |
entity's system Id |
general |
whether a general entity (FALSE if parameter entity) |
This event marks a processing instruction. The PI's target and data will be in the data encoding. There is always a target, but the data may be NULL
.
Syntax
virtual void processingInstruction( oratext* target, oratext* data) = 0;
Parameter | Description |
---|---|
target |
PI's target |
data |
PI's data |
Receive notification of the start of document.
Syntax
virtual void startDocument() = 0;
This event marks the start of an element.
Syntax
virtual void startElement( oratext* name, NodeListRef< Node>* attrs_ptr) = 0;
Parameter | Description |
---|---|
name |
element's name |
attrs_ptr |
list of element's attributes |
This event marks the start of an element. Note this is the new SAX 2 namespace-aware version. The element's qualified name, local name, and namespace URI will be in the data encoding, as are all the attribute parts.
Syntax
virtual void startElementNS( oratext* qname, oratext* local, oratext* ns_URI, NodeListRef< Node>* attrs_ptr) = 0;
Parameter | Description |
---|---|
qname |
element's qualified name |
local |
element's namespace local name |
ns_URI |
element's namespace URI |
attrs_ref |
NodeList of element's attributes |
Marks an unparsed entity declaration in the DTD. The unparsed entity's name, public ID, system ID, and notation name will all be in the data encoding.
Syntax
virtual void unparsedEntityDecl( oratext* name, oratext* public_id, oratext* system_id, oratext* notation_name) = 0; };
Parameter | Description |
---|---|
name |
entity's name |
public_id |
entity's public Id |
sysem_id |
entity's system Id |
notation_name |
entity's notation name |
This event marks ignorable whitespace data such as newlines, and indentation between lines.
Syntax
virtual void whitespace( oratext* data, ub4 size) = 0;
Parameter | Description |
---|---|
data |
pointer to data |
size |
length of data |