Skip Headers

Oracle® XML API Reference
10g Release 1 (10.1)
Part No. B10789-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents

Previous Next  

SAXHandler Interface

Table 18-5 summarizes the methods of available through the SAXHandler interface.

Table 18-5 Summary of SAXHandler Methods; Parser Package

Function Summary
CDATA
Receive notification of CDATA.
XMLDecl
Receive notification of an XML declaration.
attributeDecl
Receive notification of attribute's declaration.
characters
Receive notification of character data.
comment
Receive notification of a comment.
elementDecl
Receive notification of element's declaration.
endDocument
Receive notification of the end of the document.
endElement
Receive notification of element's end.
notationDecl
Receive notification of a notation declaration.
parsedEntityDecl
Receive notification of a parsed entity declaration.
processingInstruction
Receive notification of a processing instruction.
startDocument
Receive notification of the start of the document.
startElement
Receive notification of element's start.
startElementNS
Receive namespace aware notification of element's start.
unparsedEntityDecl
Receive notification of an unparsed entity declaration.
whitespace
Receive notification of whitespace characters.


CDATA

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


XMLDecl

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


attributeDecl

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


characters

This event marks character data.


Syntax
virtual void characters(
   oratext* ch,
   ub4 size) = 0;

Parameter Description
ch
pointer to data
size
length of data


comment

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


elementDecl

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


endDocument

Receive notification of the end of the document.


Syntax
virtual void endDocument() = 0;


endElement

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;


notationDecl

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


parsedEntityDecl

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)


processingInstruction

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


startDocument

Receive notification of the start of document.


Syntax
virtual void startDocument() = 0;


startElement

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


startElementNS

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


unparsedEntityDecl

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


whitespace

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