Skip Headers
Oracle® Database XML C++ API Reference
11g Release 2 (11.2)

Part Number E10771-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
CPXML01100

2 Package Dom APIs for C++

Interfaces in this package represent DOM level 2 Core interfaces according to http://www.w3.org/TR/DOM-Level-2-Core/.

This chapter contains the following sections:

See Also:

CPXML2171

Using Dom

DOM interfaces are represented as generic references to different implementations of the DOM specifications. They are parameterized by Node, which supports various specializations and instantiations. Of them, the most important is xmlnode that corresponds to the current C implementation.

These generic references do not have a NULL-like value. Any implementation should never create a stateless reference. If there is need to signal that something has no state, an exception should be thrown.

Many methods might throw the SYNTAX_ERR exception, if the DOM tree is incorrectly formed, or UNDEFINED_ERR, in the case of wrong parameters or unexpected NULL pointers. If these are the only errors that a particular method might throw, it is not reflected in the method signature.

Actual DOM trees do not dependent on the context (TCtx). However, manipulations on DOM trees in the current, xmlctx based implementation require access to the current context (TCtx). This is accomplished by passing the context pointer to the constructor of DOMImplRef. In multithreaded environment DOMImplRef is always created in the thread context and, so, has the pointer to the right context.

DOMImplRef providea a way to create DOM trees. DomImplRef is a reference to the actual DOMImplementation object that is created when a regular, non-copy constructor of DomImplRef is invoked. This works well in multithreaded environment where DOM trees need to be shared, and each thread has a separate TCtx associated with it. This works equally well in a single threaded environment.

DOMString is only one of encodings supported by Oracle implementations. The support of other encodings is Oracle's extension. The oratext* data type is used for all encodings.

CPXML01110

Dom Datatypes

Table 2-1 summarizes the datatypes of the Dom package.

CPXML2172Table 2-1 Summary of Datatypes; Dom Package

Datatype Description

AcceptNodeCodes

Defines values returned by node filters.

CompareHowCode

Defines type of comparison.

DOMNodeType

Defines type of node.

DOMExceptionCode

Defines codes for DOM exception.

WhatToShowCode

Defines codes for filtering.

RangeExceptionCode

Codes for DOM Range exceptions.


CPXML2173

AcceptNodeCodes

Defines values returned by node filters. Used by node iterators and tree walkers.

CPXML2174Definition

typedef enum AcceptNodeCode {
   FILTER_ACCEPT   = 1,
   FILTER_REJECT   = 2,
   FILTER_SKIP     = 3
    } AcceptNodeCode;
CPXML2175

CompareHowCode

Defines type of comparison.

CPXML2176Definition

typedef enum CompareHowCode {
   START_TO_START = 0,
   START_TO_END = 1, 
   END_TO_END = 2, 
   END_TO_START = 3 }
CompareHowCode;
CPXML2177

DOMNodeType

Defines type of node.

CPXML2178Definition

typedef enum DOMNodeType {
   UNDEFINED_NODE = 0,
   ELEMENT_NODE = 1, 
   ATTRIBUTE_NODE = 2, 
   TEXT_NODE = 3, 
   CDATA_SECTION_NODE = 4, 
   ENTITY_REFERENCE_NODE = 5, 
   ENTITY_NODE = 6, 
   PROCESSING_INSTRUCTION_NODE = 7, 
   COMMENT_NODE = 8, 
   DOCUMENT_NODE = 9, 
   DOCUMENT_TYPE_NODE = 10, 
   DOCUMENT_FRAGMENT_NODE = 11, 
   NOTATION_NODE = 12 
} DOMNodeType;
CPXML2179

DOMExceptionCode

Defines codes for DOM exception.

CPXML2180Definition

typedef enum DOMExceptionCode {
   UNDEFINED_ERR               = 0,
   INDEX_SIZE_ERR              = 1,
   DOMSTRING_SIZE_ERR          = 2,
   HIERARCHY_REQUEST_ERR       = 3,
   WRONG_DOCUMENT_ERR          = 4,
   INVALID_CHARACTER_ERR       = 5,
   NO_DATA_ALLOWED_ERR         = 6,
   NO_MODIFICATION_ALLOWED_ERR = 7,
   NOT_FOUND_ERR               = 8,
   NOT_SUPPORTED_ERR           = 9,
   INUSE_ATTRIBUTE_ERR         = 10,
   INVALID_STATE_ERR           = 11,
   SYNTAX_ERR                  = 12,
   INVALID_MODIFICATION_ERR    = 13,
   NAMESPACE_ERR               = 14,
   INVALID_ACCESS_ERR          = 15
} DOMExceptionCode;
CPXML2181

WhatToShowCode

Defines codes for filtering.

CPXML2182Definition

typedef unsigned long WhatToShowCode; 
   const unsigned long SHOW_ALL = 0xFFFFFFFF; c
   onst unsigned long SHOW_ELEMENT = 0x00000001; 
   const unsigned long SHOW_ATTRIBUTE = 0x00000002; 
   const unsigned long SHOW_TEXT = 0x00000004; 
   const unsigned long SHOW_CDATA_SECTION = 0x00000008; 
   const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010; 
   const unsigned long SHOW_ENTITY = 0x00000020; 
   const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040; 
   const unsigned long SHOW_COMMENT = 0x00000080; 
   const unsigned long SHOW_DOCUMENT = 0x00000100; 
   const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200; 
   const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400; 
   const unsigned long SHOW_NOTATION = 0x00000800;
CPXML2183

RangeExceptionCode

Codes for DOM Range exceptions.

CPXML2184Definition

typedef enum RangeExceptionCode {
   RANGE_UNDEFINED_ERR         = 0,
   BAD_BOUNDARYPOINTS_ERR      = 1,
   INVALID_NODE_TYPE_ERR       = 2
} RangeExceptionCode;
 
CPXML01120

AttrRef Interface

Table 2-2 summarizes the methods available through AttrRef interface.

CPXML2185Table 2-2 Summary of AttrRef Methods; Dom Package

Function Summary

AttrRef()

Constructor.

getName()

Return attribute's name.

getOwnerElement()

Return attribute's owning element.

getSpecified()

Return boolean indicating if an attribute was explicitly created.

getValue()

Return attribute's value.

setValue()

Set attribute's value.

~AttrRef()

Public default destructor.


CPXML2186

AttrRef()

Class constructor.

Syntax Description
AttrRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given attribute node after a call to createAttribute.
AttrRef(
   const AttrRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2187Returns

(AttrRef) Node reference object

CPXML2188

getName()

Returns the fully-qualified name of an attribute (in the data encoding) as a NULL-terminated string.

CPXML2189Syntax

oratext* getName() const;

CPXML2190Returns

(oratext *) name of attribute

CPXML2191

getOwnerElement()

Returns attribute's owning element

CPXML2192Syntax

Node* getOwnerElement();

CPXML2193Returns

(Node*) attribute's owning element node.

CPXML2194

getSpecified()

Returns the 'specified' value for an attribute. If the attribute was explicitly given a value in the original document, it is TRUE; otherwise, it is FALSE. If the node is not an attribute, returns FALSE. If the user sets attribute's value through DOM, its 'specified' value will be TRUE.

CPXML2195Syntax

boolean getSpecified() const;

CPXML2196Returns

(boolean) attribute's "specified" value

CPXML2197

getValue()

Returns the "value" (character data) of an attribute (in the data encoding) as NULL-terminated string. Character and general entities will have been replaced.

CPXML2198Syntax

oratext* getValue() const;

CPXML2199Returns

(oratext*) attribute's value

CPXML2200

setValue()

Sets the given attribute's value to data. The new value must be in the data encoding. It is not verified, converted, or checked. The attribute's 'specified' flag will be TRUE after setting a new value.

CPXML2201Syntax

void setValue(
   oratext* data) 
throw (DOMException);
Parameter Description
data
new value of attribute

CPXML2202

~AttrRef()

This is the default destructor.

CPXML2203Syntax

~AttrRef();
CPXML01130

CDATASectionRef Interface

Table 2-3 summarizes the methods available through CDATASectionRef interface.

CPXML2204Table 2-3 Summary of CDATASectionRef Methods; Dom Package

Function Summary

CDATASectionRef()

Constructor.

~CDATASectionRef()

Public default destructor.


CPXML2205

CDATASectionRef()

Class constructor.

Syntax Description
CDATASectionRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given CDATA node after a call to createCDATASection.
CDATASectionRef(
   const CDATASectionRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2206Returns

(CDATASectionRef) Node reference object

CPXML2207

~CDATASectionRef()

This is the default destructor.

CPXML2208Syntax

~CDATASectionRef();
CPXML01140

CharacterDataRef Interface

Table 2-4 summarizes the methods available through CharacterDataRef interface.

CPXML2209Table 2-4 Summary of CharacterDataRef Methods; Dom Package

Function Summary

appendData()

Append data to end of node's current data.

deleteData()

Remove part of node's data.

freeString()

Deallocate the string allocated by substringData.

getData()

Return node's data.

getLength()

Return length of node's data.

insertData()

Insert string into node's current data.

replaceData()

Replace part of node's data.

setData()

Set node's data.

substringData()

Get substring of node's data.


CPXML2210

appendData()

Append a string to the end of a CharacterData node's data. The appended data should be in the data encoding. It will not be verified, converted, or checked.

CPXML2211Syntax

void appendData( 
   oratext* data) 
throw (DOMException);
Parameter Description
data
data to append

CPXML2212

deleteData()

Remove a range of characters from a CharacterData node's data. The offset is zero-based, so offset zero refers to the start of the data. Both offset and count are in characters, not bytes. If the sum of offset and count exceeds the data length then all characters from offset to the end of the data are deleted.

CPXML2213Syntax

void deleteData( 
   ub4 offset, 
   ub4 count) 
throw (DOMException);
Parameter Description
offset
character offset where deletion starts
count
number of characters to delete

CPXML2214

freeString()

Deallocates the string allocated by substringData(). It is Oracle's extension.

CPXML2215Syntax

void freeString( 
   oratext* str);
Parameter Description
str
string

CPXML2216

getData()

Returns the data for a CharacterData node (type text, comment or CDATA) in the data encoding.

CPXML2217Syntax

oratext* getData() const;

CPXML2218Returns

(oratext*) node's data

CPXML2219

getLength()

Returns the length of the data for a CharacterData node (type Text, Comment or CDATA) in characters (not bytes).

CPXML2220Syntax

ub4 getLength() const;

CPXML2221Returns

(ub4) length in characters (not bytes!) of node's data

CPXML2222

insertData()

Insert a string into a CharacterData node's data at the specified position. The inserted data must be in the data encoding. It will not be verified, converted, or checked. The offset is specified as characters, not bytes. The offset is zero-based, so inserting at offset zero prepends the data.

CPXML2223Syntax

void insertData( 
   ub4 offset,
   oratext* data) 
throw (DOMException);
Parameter Description
offset
character offset where insertion starts
data
data to insert

CPXML2224

replaceData()

Replaces a range of characters in a CharacterData node's data with a new string. The offset is zero-based, so offset zero refers to the start of the data. The replacement data must be in the data encoding. It will not be verified, converted, or checked. The offset and count are both in characters, not bytes. If the sum of offset and count exceeds length, then all characters to the end of the data are replaced.

CPXML2225Syntax

void replaceData( 
   ub4 offset, 
   ub4 count, 
   oratext* data)
throw (DOMException);
Parameter Description
offset
offset
count
number of characters to replace
data
data

CPXML2226

setData()

Sets data for a CharacterData node (type text, comment or CDATA), replacing the old data. The new data is not verified, converted, or checked -- it should be in the data encoding.

CPXML2227Syntax

void setData( 
   oratext* data) 
throw (DOMException);
Parameter Description
data
data

CPXML2228

substringData()

Returns a range of character data from a CharacterData node (type Text, Comment or CDATA). Since the data is in the data encoding, offset and count are in characters, not bytes. The beginning of the string is offset 0. If the sum of offset and count exceeds the length, then all characters to the end of the data are returned. The substring is permanently allocated in the context managed memory and should be explicitly deallocated by freeString

CPXML2229Syntax

oratext* substringData( 
   ub4 offset, 
   ub4 count) 
throw (DOMException);
Parameter Description
offset
offset
count
number of characters to extract

CPXML2230Returns

(oratext *) specified substring

CPXML01150

CommentRef Interface

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

CPXML2231Table 2-5 Summary of CommentRef Methods; Dom Package

Function Summary

CommentRef()

Constructor.

~CommentRef()

Public default destructor.


CPXML2232

CommentRef()

Class constructor.

Syntax Description
CommentRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given comment node after a call to createComment.
CommentRef(
   const CommentRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2233Returns

(CommentRef) Node reference object

CPXML2234

~CommentRef()

This is the default destructor.

CPXML2235Syntax

~CommentRef();
CPXML01160

DOMException Interface

Table 2-6 summarizes the methods available through the DOMException interface.

CPXML2236Table 2-6 Summary of DOMException Methods; Dom Package

Function Summary

getDOMCode()

Get DOM exception code embedded in the exception.

getMesLang()

Get current language encoding of error messages.

getMessage()

Get Oracle XML error message.


CPXML2237

getDOMCode()

This is a virtual member function that defines a prototype for implementation defined member functions returning DOM exception codes, defined in DOMExceptionCode, of the exceptional situations during execution

CPXML2238Syntax

virtual DOMExceptionCode getDOMCode() const = 0;

CPXML2239Returns

(DOMExceptionCode) exception code

CPXML2240

getMesLang()

Virtual member function inherited from XmlException

CPXML2241Syntax

virtual oratext* getMesLang() const = 0;

CPXML2242Returns

(oratext*) Current language (encoding) of error messages

CPXML2243

getMessage()

Virtual member function inherited from XmlException

CPXML2244Syntax

virtual oratext* getMessage() const = 0;

CPXML2245Returns

(oratext *) Error message

CPXML01170

DOMImplRef Interface

Table 2-7 summarizes the methods available through DOMImplRef interface.

CPXML2246Table 2-7 Summary of DOMImplRef Methods; Dom Package

Function Summary

DOMImplRef()

Constructor.

createDocument()

Create document reference.

createDocumentType()

Create DTD reference.

formDocument()

Forms document reference given a document pointer.

getImplementation()

Get DOMImplementation object associated with the document.

getNoMod()

Get the 'no modification allowed' flag value.

hasFeature()

Determine if DOM feature is implemented.

setContext()

Set another context to a node.

~DOMImplRef()

Public default destructor.


CPXML2247

DOMImplRef()

Class constructor.

Syntax Description
DOMImplRef(
   Context* ctx_ptr,
   DOMImplementation< Node>* impl_ptr);
Creates reference object to DOMImplementation object in a given context. Returns reference to the implementation object.
DOMImplRef(
   const DOMImplRef< Context, Node>& iref);
It is needed to create other references to the implementation object; deletion flags are not copied.
DOMImplRef(
   const DOMImplRef< Context, Node>& iref,
   Context* ctx_ptr);
It is needed to create references to the implementation object in a different context; deletion flags are not copied.

Parameter Description
ctx_ptr
context pointer
impl_ptr
implementation

CPXML2248Returns

(DOMImplRef) reference to the implementation object

CPXML2249

createDocument()

Creates document reference

CPXML2250Syntax

DocumentRef< Node>* createDocument(
   oratext* namespaceURI,
   oratext* qualifiedName,
   DocumentTypeRef< Node>& doctype)
throw (DOMException);
Parameter Description
namespaceURI
namespace URI of root element
qualifiedName
qualified name of root element
doctype
associated DTD node

CPXML2251Returns

(DocumentRef< Node>*) document reference

CPXML2252

createDocumentType()

Creates DTD reference

CPXML2253Syntax

DocumentTypeRef< Node>* createDocumentType(
   oratext* qualifiedName,
   oratext* publicId,
   oratext* systemId)
throw (DOMException);
Parameter Description
qualifiedName
qualified name
publicId
external subset public Id
systemId
external subset system Id

CPXML2254Returns

(DocumentTypeRef< Node>*) DTD reference

CPXML2255

formDocument()

Forms a document reference given a document pointer.

CPXML2256Syntax

DocumentRef< Node>* formDocument( Node* node);
Parameter Description
node
pointer to the document node

CPXML2257Returns

(DocumentRef< Node>*) pointer to the document reference

CPXML2258

getImplementation()

Returns DOMImplementation object that was used to create this document. When the DOMImplementation object is destructed, all document trees associated with it are also destructed.

CPXML2259Syntax

DOMImplementation< Node>* getImplementation() const;

CPXML2260Returns

(DOMImplementation) DOMImplementation reference object

CPXML2261

getNoMod()

Get the 'no modification allowed' flag value. This is an Oracle extension.

CPXML2262Syntax

boolean getNoMod() const;

CPXML2263Returns

TRUE if flag's value is TRUE, FALSE otherwise

CPXML2264

hasFeature()

Determine if a DOM feature is implemented. Returns TRUE if the feature is implemented in the specified version, FALSE otherwise.

In level 1, the legal values for package are 'HTML' and 'XML' (case-insensitive), and the version is the string "1.0". If the version is not specified, supporting any version of the feature will cause the method to return TRUE.

DOM 1.0 features are "XML" and "HTML".

DOM 2.0 features are "Core", "XML", "HTML", "Views", "StyleSheets", "CSS", "CSS2", "Events", "UIEvents", "MouseEvents", "MutationEvents", "HTMLEvents", "Range", "Traversal"

CPXML2265Syntax

boolean hasFeature(
   oratext* feature, 
   oratext* version);
Parameter Description
feature
package name of feature
version
version of package

CPXML2266Returns

(boolean) is feature implemented?

CPXML2267

setContext()

It is needed to create node references in a different context

CPXML2268Syntax

void setContext(
   NodeRef< Node>& nref, 
   Context* ctx_ptr);
Parameter Description
nref
reference node
ctx_ptr
context pointer

CPXML2269

~DOMImplRef()

This is the default destructor. It cleans the reference to the implementation object. It is usually called by the environment. But it can be called by the user directly if necessary.

CPXML2270Syntax

~DOMImplRef(); 
CPXML01180

DOMImplementation Interface

Table 2-8 summarizes the methods available through DOMImplementation interface.

CPXML2271Table 2-8 Summary of DOMImplementation Methods; Dom Package

Function Summary

DOMImplementation()

Constructor.

getNoMod()

Get the 'nomodificationallowed' flag value.

~DOMImplementation()

Public default destructor.


CPXML2272

DOMImplementation()

Creates DOMImplementation object. Sets the 'no modifications allowed' flag to the parameter value.

CPXML2273Syntax

DOMImplementation( 
   boolean no_mod);
Parameter Description
no_mod
whether modifications are allowed (FALSE) or not allowed (TRUE)

CPXML2274Returns

(DOMImplementation) implementation object

CPXML2275

getNoMod()

Get the 'no modification allowed' flag value. This is an Oracle extension.

CPXML2276Syntax

boolean getNoMod() const; 

CPXML2277Returns

TRUE if flag's value is TRUE, FALSE otherwise

CPXML2278

~DOMImplementation()

This is the default destructor. It removes all DOM trees associated with this object.

CPXML2279Syntax

~DOMImplementation(); 
CPXML01190

DocumentFragmentRef Interface

Table 2-9 summarizes the methods available through DocumentFragmentRef interface.

CPXML2280Table 2-9 Summary of DocumentFragmentRef Methods; Dom Package

Function Summary

DocumentFragmentRef()

Constructor.

~DocumentFragmentRef()

Public default destructor.


CPXML2281

DocumentFragmentRef()

Class constructor.

Syntax Description
DocumentFragmentRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given fragment node after a call to createDocumentFragment.
DocumentFragmentRef(
   const DocumentFragmentRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2282Returns

(DocumentFragmentRef) Node reference object

CPXML2283

~DocumentFragmentRef()

This is the default destructor.

CPXML2284Syntax

~DocumentFragmentRef() {}
CPXML01200

DocumentRange Interface

Table 2-10 summarizes the methods available through DocumentRange interface.

CPXML2285Table 2-10 Summary of DocumentRange Methods; Dom Package

Function Summary

DocumentRange()

Constructor.

createRange()

Create new range object.

destroyRange()

Destroys Range object.

~DocumentRange()

Default destructor.


CPXML2286

DocumentRange()

Constructs the factory.

CPXML2287Syntax

DocumentRange();

CPXML2288Returns

(DocumentRange) new factory object

CPXML2289

createRange()

Create new range object.

CPXML2290Syntax

Range< Node>* createRange( 
   DocumentRef< Node>& doc);
Parameter Description
doc
reference to document node

CPXML2291Returns

(Range*) Pointer to new range

CPXML2292

destroyRange()

Destroys range object.

CPXML2293Syntax

void destroyRange( 
   Range< Node>* range)
throw (DOMException);
Parameter Description
range
range

CPXML2294

~DocumentRange()

Default destructor.

CPXML2295Syntax

~DocumentRange();
CPXML01210

DocumentRef Interface

Table 2-11 summarizes the methods available through DocumentRef interface.

CPXML2296Table 2-11 Summary of DocumentRef Methods; Dom Package

Function Summary

DocumentRef()

Constructor.

createAttribute()

Create an attribute node.

createAttributeNS()

Create an attribute node with namespace information.

createCDATASection()

Create a CDATA node.

createComment()

Create a comment node.

createDocumentFragment()

Create a document fragment.

createElement()

Create an element node.

createElementNS()

Create an element node with names pace information.

createEntityReference()

Create an entity reference node.

createProcessingInstruction()

Create a ProcessingInstruction node

createTextNode()

Create a text node.

getDoctype()

Get DTD associated with the document.

getDocumentElement()

Get top-level element of this document.

getElementById()

Get an element given its ID.

getElementsByTagName()

Get elements in the document by tag name.

getElementsByTagNameNS()

Get elements in the document by tag name (namespace aware version).

getImplementation()

Get DOMImplementation object associated with the document.

importNode()

Import a node from another DOM.s

~DocumentRef()

Public default destructor.


CPXML2297

DocumentRef()

This is a constructor.

Syntax Description
DocumentRef(
   const NodeRef< Node>& nref,
   Node* nptr);
Default constructor.
DocumentRef(
   const DocumentRef< Node>& nref);
Copy constructor.

Parameter Description
nref
reference to provide the context
nptr
referenced node

CPXML2298Returns

(DocumentRef) Node reference object

CPXML2299

createAttribute()

Creates an attribute node with the given name. This is the non-namespace aware function. The new attribute will have NULL namespace URI and prefix, and its local name will be the same as its name, even if the name specified is a qualified name. The new node is an orphan with no parent. The name is not copied, its pointer is just stored. The user is responsible for persistence and freeing of that data.

CPXML2300Syntax

Node* createAttribute( 
   oratext* name) 
throw (DOMException);
Parameter Description
name
name

CPXML2301Returns

(Node*) New attribute node

CPXML2302

createAttributeNS()

Creates an attribute node with the given namespace URI and qualified name. The new node is an orphan with no parent. The URI and qualified name are not copied, their pointers are just stored. The user is responsible for persistence and freeing of that data.

CPXML2303Syntax

Node* createAttributeNS( 
   oratext* namespaceURI,
   oratext* qualifiedName)
   throw (DOMException);
Parameter Description
namespaceURI
namespace URI
qualifiedName
qualified name

CPXML2304Returns

(Node*) New attribute node

CPXML2305

createCDATASection()

Creates a CDATA section node with the given initial data (which should be in the data encoding). A CDATA section is considered verbatim and is never parsed; it will not be joined with adjacent text nodes by the normalize operation. The initial data may be NULL, if provided; it is not verified, converted, or checked. The name of a CDATA node is always "#cdata-section". The new node is an orphan with no parent. The CDATA is not copied, its pointer is just stored. The user is responsible for persistence and freeing of that data.

CPXML2306Syntax

Node* createCDATASection(
   oratext* data)
throw (DOMException);
Parameter Description
data
data for new node

CPXML2307Returns

(Node*) New CDATA node

CPXML2308

createComment()

Creates a comment node with the given initial data (which must be in the data encoding). The data may be NULL, if provided; it is not verified, converted, or checked. The name of the comment node is always "#comment". The new node is an orphan with no parent. The comment data is not copied, its pointer is just stored. The user is responsible for persistence and freeing of that data.

CPXML2309Syntax

Node* createComment( 
   oratext* data)
throw (DOMException);
Parameter Description
data
data for new node

CPXML2310Returns

(Node*) New comment node

CPXML2311

createDocumentFragment()

Creates an empty Document Fragment node. A document fragment is treated specially when it is inserted into a DOM tree: the children of the fragment are inserted in order instead of the fragment node itself. After insertion, the fragment node will still exist, but have no children. The name of a fragment node is always "#document-fragment".

CPXML2312Syntax

Node* createDocumentFragment()
throw (DOMException);

CPXML2313Returns

(Node*) new document fragment node

CPXML2314

createElement()

Creates an element node with the given tag name (which should be in the data encoding). The new node is an orphan with no parent. The tagname is not copied, its pointer is just stored. The user is responsible for persistence and freeing of that data.

Note that the tag name of an element is case sensitive. This is the non-namespace aware function: the new node will have NULL namespace URI and prefix, and its local name will be the same as its tag name, even if the tag name specified is a qualified name.

CPXML2315Syntax

Node* createElement(
   oratext* tagname)
throw (DOMException);
Parameter Description
tagname
tag name

CPXML2316Returns

(Node*) New element node

CPXML2317

createElementNS()

Creates an element with the given namespace URI and qualified name. The new node is an orphan with no parent. The URI and qualified name are not copied, their pointers are just stored. The user is responsible for persistence and freeing of that data.

Note that element names are case sensitive, and the qualified name is required though the URI may be NULL. The qualified name will be split into prefix and local parts. The tagName will be the full qualified name.

CPXML2318Syntax

Node* createElementNS(
   oratext* namespaceURI,
   oratext* qualifiedName)
throw (DOMException);
Parameter Description
namespaceURI
namespace URI
qualifiedName
qualified name

CPXML2319Returns

(Node*) New element node

CPXML2320

createEntityReference()

Creates an entity reference node; the name (which should be in the data encoding) is the name of the entity to be referenced. The named entity does not have to exist. The name is not verified, converted, or checked. The new node is an orphan with no parent. The entity reference name is not copied; its pointer is just stored. The user is responsible for persistence and freeing of that data.

Note that entity reference nodes are never generated by the parser; instead, entity references are expanded as encountered. On output, an entity reference node will turn into a "&name;" style reference.

CPXML2321Syntax

Node* createEntityReference(
   oratext* name)
throw (DOMException);
Parameter Description
name
name

CPXML2322Returns

(Node*) New entity reference node

CPXML2323

createProcessingInstruction()

Creates a processing instruction node with the given target and data (which should be in the data encoding). The data may be NULL, but the target is required and cannot be changed. The target and data are not verified, converted, or checked. The name of the node is the same as the target. The new node is an orphan with no parent. The target and data are not copied; their pointers are just stored. The user is responsible for persistence and freeing of that data.

CPXML2324Syntax

Node* createProcessingInstruction(
   oratext* target,
   oratext* data)
throw (DOMException);
Parameter Description
target
target
data
data for new node

CPXML2325Returns

(Node*) New PI node

CPXML2326

createTextNode()

Creates a text node with the given initial data (which must be non-NULL and in the data encoding). The data may be NULL; if provided, it is not verified, converted, checked, or parsed (entities will not be expanded). The name of the node is always "#text". The new node is an orphan with no parent. The text data is not copied, its pointer is just stored. The user is responsible for persistence and freeing of that data.

CPXML2327Syntax

Node* createTextNode(
   oratext* data)
throw (DOMException);
Parameter Description
data
data for new text node

CPXML2328Returns

(Node*) new text node

CPXML2329

getDoctype()

Returns the DTD node associated with this document. After this call, a DocumentTypeRef object needs to be created with an appropriate constructor in order to call its member functions. The DTD tree cannot be edited.

CPXML2330Syntax

Node* getDoctype() const;

CPXML2331Returns

(Node*) DTD node

CPXML2332

getDocumentElement()

Returns the root element (node) of the DOM tree. Each document has only one uppermost Element node, called the root element. If there is no root element, NULL is returned. This can happen when the document tree is being constructed.

CPXML2333Syntax

Node* getDocumentElement() const;

CPXML2334Returns

(Node*) Root element

CPXML2335

getElementById()

Returns the element node which has the given ID. Throws NOT_FOUND_ERR if no element is found. The given ID should be in the data encoding or it might not match.

Note that attributes named "ID" are not automatically of type ID; ID attributes (which can have any name) must be declared as type ID in the DTD or XML schema associated with the document.

CPXML2336Syntax

Node* getElementById(
   oratext* elementId);
Parameter Description
elementId
element id

CPXML2337Returns

(Node*)Element node

CPXML2338

getElementsByTagName()

Returns a list of all elements in the document with a given tag name, in document order (the order in which they would be encountered in a preorder traversal of the tree). The list should be freed by the user when it is no longer needed. The list is not live, it is a snapshot. That is, if a new node which matched the tag name were added to the DOM after the list was returned, the list would not automatically be updated to include the node.

The special name "*" matches all tag names; a NULL name matches nothing. Note that tag names are case sensitive, and should be in the data encoding or a mismatch might occur.

This function is not namespace aware; the full tag names are compared. If two qualified names with two different prefixes both of which map to the same URI are compared, the comparison will fail.

CPXML2339Syntax

NodeList< Node>* getElementsByTagName( 
   oratext* tagname) const;
Parameter Description
tagname
tag name

CPXML2340Returns

(NodeList< Node>*) List of nodes

CPXML2341

getElementsByTagNameNS()

Returns a list of all elements in the document with a given namespace URI and local name, in document order (the order in which they would be encountered in a preorder traversal of the tree). The list should be freed by the user when it is no longer needed. The list is not live, it is a snapshot. That is, if a new node which matches the URI and local name were added to the DOM after the list was returned, the list would not automatically be updated to include the node.

The URI and local name should be in the data encoding. The special name "*" matches all local names; a NULL local name matches nothing. Namespace URIs must always match, however, no wildcard is allowed. Note that comparisons are case sensitive.

CPXML2342Syntax

NodeList< Node>* getElementsByTagNameNS(
   oratext* namespaceURI,
   oratext* localName);
Parameter Description
namespaceURI
namespace URI to match
localName
local name to match

CPXML2343Returns

(NodeList< Node>*) List of nodes

CPXML2344

getImplementation()

Returns DOMImplementation object that was used to create this document. When the DOMImplementation object is destructed, all document trees associated with it are also destructed.

CPXML2345Syntax

DOMImplementation< Node>* getImplementation() const;

CPXML2346Returns

(DOMImplementation) DOMImplementation reference object

CPXML2347

importNode()

Imports a node from one Document to another. The new node is an orphan and has no parent. The original node is not modified in any way or removed from its document; instead, a new node is created with copies of all the original node's qualified name, prefix, namespace URI, and local name.

The deep parameter controls whether the children of the node are recursively imported. If FALSE, only the node itself is imported, and it will have no children. If TRUE, all descendents of the node will be imported as well, and an entire new subtree created. Elements will have only their specified attributes imported; non-specified (default) attributes are omitted. New default attributes (for the destination document) are then added. Document and DocumentType nodes cannot be imported.

CPXML2348Syntax

Node* importNode( 
   NodeRef< Node>& importedNode,
   boolean deep) const
throw (DOMException);
Parameter Description
importedNode
node to import
deep
indicator for recursively importing the subtree

CPXML2349Returns

(Node*) New imported node

CPXML2350

~DocumentRef()

This is the default destructor. It cleans the reference to the node. If the document node is marked for deletion, the destructor deletes the node and the tree under it. It is always deep deletion in the case of a document node. The destructor can be called by the environment or by the user directly.

CPXML2351Syntax

~DocumentRef();
CPXML01220

DocumentTraversal Interface

Table 2-12 summarizes the methods available through DocumentTraversal interface.

CPXML2352Table 2-12 Summary of DocumentTraversal Methods; Dom Package

Function Summary

DocumentTraversal()

Constructor.

createNodeIterator()

Create new NodeIterator object.

createTreeWalker()

Create new TreeWalker object.

destroyNodeIterator()

Destroys NodeIterator object.

destroyTreeWalker()

Destroys TreeWalker object.

~DocumentTraversal()

Default destructor.


CPXML2353

DocumentTraversal()

Constructs the factory.

CPXML2354Syntax

DocumentTraversal();

CPXML2355Returns

(DocumentTraversal) new factory object

CPXML2356

createNodeIterator()

Create new iterator object.

CPXML2357Syntax

NodeIterator< Node>* createNodeIterator(
   NodeRef< Node>& root,
   WhatToShowCode whatToShow,
   boolean entityReferenceExpansion)
throw (DOMException);
Parameter Description
root
root of subtree, for iteration
whatToShow
node types filter
entityReferenceExpansion
if TRUE, expand entity references

CPXML2358Returns

(NodeIterator*) Pointer to new iterator

CPXML2359

createTreeWalker()

Create new TreeWalker object.

CPXML2360Syntax

TreeWalker< Node>* createTreeWalker(
   NodeRef< Node>& root,
   WhatToShowCode whatToShow,
   boolean entityReferenceExpansion)
throw (DOMException);
Parameter Description
root
root of subtree, for traversal
whatToShow
node types filter
entityReferenceExpansion
if TRUE, expand entity references

CPXML2361Returns

(TreeWalker*) Pointer to new tree walker

CPXML2362

destroyNodeIterator()

Destroys node iterator object.

CPXML2363Syntax

void destroyNodeIterator(
   NodeIterator< Node>* iter)
throw (DOMException);
Parameter Description
iter
iterator

CPXML2364

destroyTreeWalker()

Destroys TreeWalker object.

CPXML2365Syntax

void destroyTreeWalker(
   TreeWalker< Node>* walker)
throw (DOMException);
Parameter Description
walker
TreeWalker

CPXML2366

~DocumentTraversal()

Default destructor.

CPXML2367Syntax

~DocumentTraversal();
CPXML01230

DocumentTypeRef Interface

Table 2-13 summarizes the methods available through DocumentTypeRef interface.

CPXML2368Table 2-13 Summary of DocumentTypeRef Methods; Dom Package

Function Summary

DocumentTypeRef()

Constructor.

getEntities()

Get DTD's entities.

getInternalSubset()

Get DTD's internal subset.

getName()

Get name of DTD.

getNotations()

Get DTD's notations.

getPublicId()

Get DTD's public ID.

getSystemId()

Get DTD's system ID.

~DocumentTypeRef()

Public default destructor.


CPXML2369

DocumentTypeRef()

This is a constructor.

Syntax Description
DocumentTypeRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Default constructor.
DocumentTypeRef(
   const DocumentTypeRef< Node>& node_ref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2370Returns

(DocumentTypeRef) Node reference object

CPXML2371

getEntities()

Returns a named node map of general entities defined by the DTD.

CPXML2372Syntax

NamedNodeMap< Node>* getEntities() const;

CPXML2373Returns

(NamedNodeMap< Node>*) map containing entities

CPXML2374

getInternalSubset()

Returns the content model for an element. If there is no DTD, returns NULL.

CPXML2375Syntax

Node* getInternalSubset( 
   oratext* name);
Parameter Description
name
name of element

CPXML2376Returns

(xmlnode*) content model subtree

CPXML2377

getName()

Returns DTD's name (specified immediately after the DOCTYPE keyword)

CPXML2378Syntax

oratext* getName() const;

CPXML2379Returns

(oratext*) name of DTD

CPXML2380

getNotations()

Returns a named node map of notations declared by the DTD.

CPXML2381Syntax

NamedNodeMap< Node>* getNotations() const;

CPXML2382Returns

(NamedNodeMap< Node>*) map containing notations

CPXML2383

getPublicId()

Returns DTD's public identifier

CPXML2384Syntax

oratext* getPublicId() const;

CPXML2385Returns

(oratext*) DTD's public identifier

CPXML2386

getSystemId()

Returns DTD's system identifier

CPXML2387Syntax

oratext* getSystemId() const;

CPXML2388Returns

(oratext*) DTD's system identifier

CPXML2389

~DocumentTypeRef()

This is the default destructor.

CPXML2390Syntax

~DocumentTypeRef();
CPXML01240

ElementRef Interface

Table 2-14 summarizes the methods available through ElementRef interface.

CPXML2391Table 2-14 Summary of ElementRef Methods; Dom Package

Function Summary

ElementRef()

Constructor.

getAttribute()

Get attribute's value given its name.

getAttributeNS()

Get attribute's value given its URI and local name.

getAttributeNode()

Get the attribute node given its name.

getElementsByTagName()

Get elements with given tag name.

getTagName()

Get element's tag name.

hasAttribute()

Check if named attribute exists.

hasAttributeNS()

Check if named attribute exists (namespace aware version).

removeAttribute()

Remove attribute with specified name.

removeAttributeNS()

Remove attribute with specified URI and local name.

removeAttributeNode()

Remove attribute node

setAttribute()

Set new attribute for this element and/or new value.

setAttributeNS()

Set new attribute for the element and/or new value.

setAttributeNode()

Set attribute node.

~ElementRef()

Public default destructor.


CPXML2392

ElementRef()

Class constructor.

Syntax Description
ElementRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given element node after a call to createElement.
ElementRef(
   const ElementRef< Node>& node_ref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2393Returns

(ElementRef) Node reference object

CPXML2394

getAttribute()

Returns the value of an element's attribute (specified by name). Note that an attribute may have the empty string as its value, but cannot be NULL.

CPXML2395Syntax

oratext* getAttribute(
   oratext* name) const;
Parameter Description
name
name of attribute (data encoding)

CPXML2396Returns

(oratext*) named attribute's value (in data encoding)

CPXML2397

getAttributeNS()

Returns the value of an element's attribute (specified by URI and local name). Note that an attribute may have the empty string as its value, but cannot be NULL.

CPXML2398Syntax

oratext* getAttributeNS(
   oratext* namespaceURI,
   oratext* localName);
Parameter Description
namespaceURI
namespace URI of attribute (data encoding)
localName
local name of attribute (data encoding)

CPXML2399Returns

(oratext *) named attribute's value (in data encoding)

CPXML2400

getAttributeNode()

Returns the attribute node given its name.

CPXML2401Syntax

Node* getAttributeNode(
   oratext* name) const;
Parameter Description
name
name of attribute (data encoding)

CPXML2402Returns

(Node*) the attribute node

CPXML2403

getElementsByTagName()

Returns a list of all elements with a given tag name, in the order in which they would be encountered in a preorder traversal of the subtree. The tag name should be in the data encoding. The special name "*" matches all tag names; a NULL name matches nothing. Tag names are case sensitive. This function is not namespace aware; the full tag names are compared. The returned list should be freed by the user.

CPXML2404Syntax

NodeList< Node>* getElementsByTagName(
   oratext* name);
Parameter Description
name
tag name to match (data encoding)

CPXML2405Returns

(NodeList< Node>*) the list of elements

CPXML2406

getTagName()

Returns the tag name of an element node which is supposed to have the same value as the node name from the node interface

CPXML2407Syntax

oratext* getTagName() const;

CPXML2408Returns

(oratext*) element's name [in data encoding]

CPXML2409

hasAttribute()

Determines if an element has a attribute with the given name

CPXML2410Syntax

boolean hasAttribute(
   oratext* name);
Parameter Description
name
name of attribute (data encoding)

CPXML2411Returns

(boolean) TRUE if element has attribute with given name

CPXML2412

hasAttributeNS()

Determines if an element has a attribute with the given URI and local name

CPXML2413Syntax

boolean hasAttributeNS(
   oratext* namespaceURI,
   oratext* localName);
Parameter Description
namespaceURI
namespace URI of attribute (data encoding)
localName
local name of attribute (data encoding)

CPXML2414Returns

(boolean) TRUE if element has such attribute

CPXML2415

removeAttribute()

Removes an attribute specified by name. The attribute is removed from the element's list of attributes, but the attribute node itself is not destroyed.

CPXML2416Syntax

void removeAttribute(
   oratext* name) throw (DOMException);
Parameter Description
name
name of attribute (data encoding)

CPXML2417

removeAttributeNS()

Removes an attribute specified by URI and local name. The attribute is removed from the element's list of attributes, but the attribute node itself is not destroyed.

CPXML2418Syntax

void removeAttributeNS(
   oratext* namespaceURI,
   oratext* localName)
throw (DOMException);
Parameter Description
namespaceURI
namespace URI of attribute (data encoding)
localName
local name of attribute (data encoding)

CPXML2419

removeAttributeNode()

Removes an attribute from an element. Returns a pointer to the removed attribute or NULL

CPXML2420Syntax

Node* removeAttributeNode(
   AttrRef< Node>& oldAttr)
throw (DOMException);
Parameter Description
oldAttr
old attribute node

CPXML2421Returns

(Node*) the attribute node (old) or NULL

CPXML2422

setAttribute()

Creates a new attribute for an element with the given name and value (which should be in the data encoding). If the named attribute already exists, its value is simply replaced. The name and value are not verified, converted, or checked. The value is not parsed, so entity references will not be expanded.

CPXML2423Syntax

void setAttribute( 
   oratext* name, 
   oratext* value)
throw (DOMException);
Parameter Description
name
names of attribute (data encoding)
value
value of attribute (data encoding)

CPXML2424

setAttributeNS()

Creates a new attribute for an element with the given URI, local name and value (which should be in the data encoding). If the named attribute already exists, its value is simply replaced. The name and value are not verified, converted, or checked. The value is not parsed, so entity references will not be expanded.

CPXML2425Syntax

void setAttributeNS( 
   oratext* namespaceURI,
   oratext* qualifiedName, 
   oratext* value)
throw (DOMException);
Parameter Description
namespaceURI
namespace URI of attribute (data encoding)
qualifiedName
qualified name of attribute(data encoding)
value
value of attribute(data encoding)

CPXML2426

setAttributeNode()

Adds a new attribute to an element. If an attribute with the given name already exists, it is replaced and a pointer to the old attribute returned. If the attribute is new, it is added to the element's list and a pointer to the new attribute is returned.

CPXML2427Syntax

Node* setAttributeNode( 
   AttrRef< Node>& newAttr)
throw (DOMException);
Parameter Description
newAttr
new node

CPXML2428Returns

(Node*) the attribute node (old or new)

CPXML2429

~ElementRef()

This is the default destructor.

CPXML2430Syntax

~ElementRef();
CPXML01250

EntityRef Interface

Table 2-15 summarizes the methods available through EntityRef interface.

CPXML2431Table 2-15 Summary of EntityRef Methods; Dom Package

Function Summary

EntityRef()

Constructor.

getNotationName()

Get entity's notation.

getPublicId()

Get entity's public ID.

getSystemId()

Get entity's system ID.

getType()

Get entity's type.

~EntityRef()

Public default destructor.


CPXML2432

EntityRef()

Class constructor.

Syntax Description
EntityRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given entity node after a call to create Entity.
EntityRef(
   const EntityRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2433Returns

(EntityRef) Node reference object

CPXML2434

getNotationName()

For unparsed entities, returns the name of its notation (in the data encoding). For parsed entities and other node types, returns NULL.

CPXML2435Syntax

oratext* getNotationName() const;

CPXML2436Returns

(oratext*) entity's notation

CPXML2437

getPublicId()

Returns an entity's public identifier (in the data encoding).

CPXML2438Syntax

oratext* getPublicId() const;

CPXML2439Returns

(oratext*) entity's public identifier

CPXML2440

getSystemId()

Returns an entity's system identifier (in the data encoding).

CPXML2441Syntax

oratext* getSystemId() const;

CPXML2442Returns

(oratext*) entity's system identifier

CPXML2443

getType()

Returns a boolean for an entity describing whether it is general (TRUE) or parameter (FALSE).

CPXML2444Syntax

boolean getType() const;

CPXML2445Returns

(boolean) TRUE for general entity, FALSE for parameter entity

CPXML2446

~EntityRef()

This is the default destructor.

CPXML2447Syntax

~EntityRef();
CPXML01260

EntityReferenceRef Interface

Table 2-16 summarizes the methods available through EntityReferenceRef interface.

CPXML2448Table 2-16 Summary of EntityReferenceRef Methods; Dom Package

Function Summary

EntityReferenceRef()

Constructor.

~EntityReferenceRef()

Public default destructor.


CPXML2449

EntityReferenceRef()

Class constructor.

Syntax Description
EntityReferenceRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given entity reference node after a call to create EntityReference.
EntityReferenceRef(
   const EntityReferenceRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2450Returns

(EntityReferenceRef) Node reference object

CPXML2451

~EntityReferenceRef()

This is the default destructor.

CPXML2452Syntax

~EntityReferenceRef();
CPXML01270

NamedNodeMapRef Interface

Table 2-17 summarizes the methods available through NamedNodeMapRef interface.

CPXML2453Table 2-17 Summary of NamedNodeMapRef Methods; Dom Package

Function Summary

NamedNodeMapRef()

Constructor

getLength()

Get map's length

getNamedItem()

Get item given its name

getNamedItemNS()

Get item given its namespace URI and local name.

item()

Get item given its index.

removeNamedItem()

Remove an item given its name.

removeNamedItemNS()

Remove the item from the map.

setNamedItem()

Add new item to the map.

setNamedItemNS()

Set named item to the map.

~NamedNodeMapRef()

Default destructor.


CPXML2454

NamedNodeMapRef()

Class constructor.

Syntax Description
NamedNodeMapRef(
   const NodeRef< Node>& node_ref,
   NamedNodeMap< Node>* mptr);
Used to create references to a given NamedNodeMap node.
NamedNodeMapRef(
   const NamedNodeMapRef< Node>& mref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2455Returns

(NamedNodeMapRef) Node reference object

CPXML2456

getLength()

Get the length of the map.

CPXML2457Syntax

ub4 getLength() const;

CPXML2458Returns

(ub4) map's length

CPXML2459

getNamedItem()

Get the name of the item, given its name.

CPXML2460Syntax

Node* getNamedItem( oratext* name) const;
Parameter Description
name
name of item

CPXML2461Returns

(Node*) pointer to the item

CPXML2462

getNamedItemNS()

Get the name of the item, given its namespace URI and local name.

CPXML2463Syntax

Node* getNamedItemNS( 
   oratext* namespaceURI,
   oratext* localName) const;
Parameter Description
namespaceURI
namespace URI of item
localName
local name of item

CPXML2464Returns

(Node*) pointer to the item

CPXML2465

item()

Get item, given its index.

CPXML2466Syntax

Node* item( 
   ub4 index) const;
Parameter Description
index
index of item

CPXML2467Returns

(Node*) pointer to the item

CPXML2468

removeNamedItem()

Remove the item from the map, given its name.

CPXML2469Syntax

Node* removeNamedItem( 
   oratext* name) 
throw (DOMException);
Parameter Description
name
name of item

CPXML2470Returns

(Node*) pointer to the removed item

CPXML2471

removeNamedItemNS()

Remove the item from the map, given its namespace URI and local name.

CPXML2472Syntax

Node* removeNamedItemNS( 
   oratext* namespaceURI,
   oratext* localName)
throw (DOMException);
Parameter Description
namespaceURI
namespace URI of item
localName
local name of item

CPXML2473Returns

(Node*) pointer to the removed item

CPXML2474

setNamedItem()

Add new item to the map.

CPXML2475Syntax

Node* setNamedItem(
   NodeRef< Node>& newItem)
throw (DOMException);
Parameter Description
newItem
item set to the map

CPXML2476Returns

(Node*) pointer to new item

CPXML2477

setNamedItemNS()

Set named item, which is namespace aware, to the map.

CPXML2478Syntax

Node* setNamedItemNS(
   NodeRef< Node>& newItem)
throw (DOMException);
Parameter Description
newItem
item set to the map

CPXML2479Returns

(Node*) pointer to the item

CPXML2480

~NamedNodeMapRef()

Default destructor.

CPXML2481Syntax

~NamedNodeMapRef();
CPXML01271

NodeFilter Interface

Table 2-18 summarizes the methods available through NodeFilter interface.

CPXML2482Table 2-18 Summary of NodeFilter Methods; Dom Package

Function Summary

acceptNode()

Execute it for a given node and use its return value.


CPXML2483

acceptNode()

This function is used as a test by NodeIterator and TreeWalker.

CPXML2484Syntax

template< typename Node> AcceptNodeCode AcceptNode(
   NodeRef< Node>& nref);
Parameter Description
nref
reference to the node to be tested.

CPXML2485Returns

(AcceptNodeCode) result returned by the filter function

CPXML01290

NodeIterator Interface

Table 2-19 summarizes the methods available through NodeIterator interface.

CPXML2486Table 2-19 Summary of NodeIterator Methods; Dom Package

Function Summary

adjustCtx()

Attach this iterator to the another context.

detach()

Invalidate the iterator.

nextNode()

Go to the next node.

previousNode()

Go to the previous node.


CPXML2487

adjustCtx()

Attaches this iterator to the context associated with a given node reference

CPXML2488Syntax

void adjustCtx( 
   NodeRef< Node>& nref);
Parameter Description
nref
reference node

CPXML2489

detach()

Invalidates the iterator.

CPXML2490Syntax

void detach();
CPXML2491

nextNode()

Go to the next node.

CPXML2492Syntax

Node* nextNode() throw (DOMException);

CPXML2493Returns

(Node*) pointer to the next node

CPXML2494

previousNode()

Go to the previous node.

CPXML2495Syntax

Node* previousNode() throw (DOMException);

CPXML2496Returns

(Node*) pointer to the previous node

CPXML01300

NodeListRef Interface

Table 2-20 summarizes the methods available through NodeListRef interface.

CPXML2497Table 2-20 Summary of NodeListRef Methods; Dom Package

Function Summary

NodeListRef()

Constructor.

getLength()

Get list's length.

item()

Get item given its index.

~NodeListRef()

Default destructor.


CPXML2498

NodeListRef()

Class constructor.

Syntax Description
NodeListRef(
   const NodeRef< Node>& node_ref,
   NodeList< Node>* lptr);
Used to create references to a given NodeList node.
NodeListRef(
   const NodeListRef< Node>& lref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
lptr
referenced list

CPXML2499Returns

(NodeListRef) Node reference object

CPXML2500

getLength()

Get the length of the list.

CPXML2501Syntax

ub4 getLength() const;

CPXML2502Returns

(ub4) list's length

CPXML2503

item()

Get the item, given its index.

CPXML2504Syntax

Node* item( 
   ub4 index) const;
Parameter Description
index
index of item

CPXML2505Returns

(Node*) pointer to the item

CPXML2506

~NodeListRef()

Destructs the object.

CPXML2507Syntax

~NodeListRef();
CPXML01310

NodeRef Interface

Table 2-21 summarizes the methods available through NodeRef interface.

CPXML2508Table 2-21 Summary of NodeRef Methods; Dom Package

Function Summary

NodeRef()

Constructor.

appendChild()

Append new child to node's list of children.

cloneNode()

Clone this node.

getAttributes()

Get attributes of this node.

getChildNodes()

Get children of this node.

getFirstChild()

Get the first child node of this node.

getLastChild()

Get the last child node of this node.

getLocalName()

Get local name of this node.

getNamespaceURI()

Get namespace URI of this node as a NULL-terminated string.

getNextSibling()

Get the next sibling node of this node.

getNoMod()

Tests if no modifications are allowed for this node.

getNodeName()

Get node's name as NULL-terminated string.

getNodeType()

Get DOMNodeType of the node.

getNodeValue()

Get node's value as NULL-terminated string.

getOwnerDocument()

Get the owner document of this node.

getParentNode()

Get parent node of this node.

getPrefix()

Get namespace prefix of this node.

getPreviousSibling()

Get the previous sibling node of this node.

hasAttributes()

Tests if this node has attributes.

hasChildNodes()

Test if this node has children.

insertBefore()

Insert new child into node's list of children.

isSupported()

Tests if specified feature is supported by the implementation.

markToDelete()

Sets the mark to delete the referenced node.

normalize()

Merge adjacent text nodes.

removeChild()

Remove an existing child node.

replaceChild()

Replace an existing child of a node.

resetNode()

Reset NodeRef to reference another node.

setNodeValue()

Set node's value as NULL-terminated string.

setPrefix()

Set namespace prefix of this node.

~NodeRef()

Public default destructor.


CPXML2509

NodeRef()

Class constructor.

Syntax Description
NodeRef(
   const NodeRef< Node>& nref,
   Node* nptr);
Used to create references to a given node when at least one reference to this node or another node is already available. The node deletion flag is not copied and is set to FALSE.
NodeRef(
   const NodeRef< Node>& nref);
Copy constructor. Used to create additional references to the node when at least one reference is already available. The node deletion flag is not copied and is set to FALSE.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2510Returns

(NodeRef) Node reference object

CPXML2511

appendChild()

Appends the node to the end of this node's list of children and returns the new node. If newChild is a DocumentFragment, all of its children are appended in original order; the DocumentFragment node itself is not. If newChild is already in the DOM tree, it is first removed from its current position.

CPXML2512Syntax

Node* appendChild( 
   NodeRef& newChild) 
throw (DOMException);
Parameter Description
newChild
reference node

CPXML2513Returns

(Node*) the node appended

CPXML2514

cloneNode()

Creates and returns a duplicate of this node. The duplicate node has no parent. Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but it does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of the node. If deep is TRUE, all children of the node are recursively cloned, and the cloned node will have cloned children; a non-deep clone will have no children. If the cloned node is not inserted into another tree or fragment, it probably should be marked, through its reference, for deletion (by the user).

CPXML2515Syntax

Node* cloneNode( 
   boolean deep);
Parameter Description
deep
whether to clone the entire node hierarchy beneath the node (TRUE), or just the node itself (FALSE)

CPXML2516Returns

(Node*) duplicate (cloned) node

CPXML2517

getAttributes()

Returns NamedNodeMap of attributes of this node, or NULL if it has no attributes. Only element nodes can have attribute nodes. For other node kinds, NULL is always returned. In the current implementation, the node map of child nodes is live; all changes in the original node are reflected immediately. Because of this, side effects can be present for some DOM tree manipulation styles, in particular, in multithreaded environments.

CPXML2518Syntax

NamedNodeMap< Node>* getAttributes() const;

CPXML2519Returns

(NamedNodeMap*) NamedNodeMap of attributes

CPXML2520

getChildNodes()

Returns the list of child nodes, or NULL if this node has no children. Only Element, Document, DTD, and DocumentFragment nodes may have children; all other types will return NULL. In the current implementation, the list of child nodes is live; all changes in the original node are reflected immediately. Because of this, side effects can be present for some DOM tree manipulation styles, in particular, in multithreaded environments.

CPXML2521Syntax

NodeList< Node>* getChildNodes() const;

CPXML2522Returns

(NodeList*) the list of child nodes

CPXML2523

getFirstChild()

Returns the first child node, or NULL, if this node has no children

CPXML2524Syntax

Node* getFirstChild() const;

CPXML2525Returns

(Node*) the first child node, or NULL

CPXML2526

getLastChild()

Returns the last child node, or NULL, if this node has no children

CPXML2527Syntax

Node* getLastChild() const;

CPXML2528Returns

(Node*) the last child node, or NULL

CPXML2529

getLocalName()

Returns local name (local part of the qualified name) of this node (in the data encoding) as a NULL-terminated string. If this node's name is not fully qualified (has no prefix), then the local name is the same as the name.

CPXML2530Syntax

oratext* getLocalName() const;

CPXML2531Returns

(oratext*) local name of this node

CPXML2532

getNamespaceURI()

Returns the namespace URI of this node (in the data encoding) as a NULL-terminated string. If the node's name is not qualified (does not contain a namespace prefix), it will have the default namespace in effect when the node was created (which may be NULL).

CPXML2533Syntax

oratext* getNamespaceURI() const;

CPXML2534Returns

(oratext*) namespace URI of this node

CPXML2535

getNextSibling()

Returns the next sibling node, or NULL, if this node has no next sibling

CPXML2536Syntax

Node* getNextSibling() const;

CPXML2537Returns

(Node*) the next sibling node, or NULL

CPXML2538

getNoMod()

Tests if no modifications are allowed for this node and the DOM tree it belongs to. This member function is Oracle extension.

CPXML2539Syntax

boolean getNoMod() const;

CPXML2540Returns

(boolean) TRUE if no modifications are allowed

CPXML2541

getNodeName()

Returns the (fully-qualified) name of the node (in the data encoding) as a NULL-terminated string, for example "bar\0" or "foo:bar\0". Some node kinds have fixed names: "#text", "#cdata-section", "#comment", "#document", "#document-fragment". The name of a node cannot changed once it is created.

CPXML2542Syntax

oratext* getNodeName() const;

CPXML2543Returns

(oratext*) name of node in data encoding

CPXML2544

getNodeType()

Returns DOMNodeType of the node

CPXML2545Syntax

DOMNodeType getNodeType() const;

CPXML2546Returns

(DOMNodeType) of the node

CPXML2547

getNodeValue()

Returns the "value" (associated character data) for a node as a NULL-terminated string. Character and general entities will have been replaced. Only Attr, CDATA, Comment, ProcessingInstruction and Text nodes have values, all other node types have NULL value.

CPXML2548Syntax

oratext* getNodeValue() const;

CPXML2549Returns

(oratext *) value of node

CPXML2550

getOwnerDocument()

Returns the document node associated with this node. It is assumed that the document node type is derived from the node type. Each node may belong to only one document, or may not be associated with any document at all, such as immediately after it was created on user's request. The "owning" document [node] is returned, or the WRONG_DOCUMENT_ERR exception is thrown.

CPXML2551Syntax

Node* getOwnerDocument() const throw (DOMException);

CPXML2552Returns

(Node*) the owning document node

CPXML2553

getParentNode()

Returns the parent node, or NULL, if this node has no parent

CPXML2554Syntax

Node* getParentNode() const;

CPXML2555Returns

(Node*) the parent node, or NULL

CPXML2556

getPrefix()

Returns the namespace prefix of this node (in the data encoding) (as a NULL-terminated string). If this node's name is not fully qualified (has no prefix), NULL is returned.

CPXML2557Syntax

oratext* getPrefix() const;

CPXML2558Returns

(oratext*) namespace prefix of this node

CPXML2559

getPreviousSibling()

Returns the previous sibling node, or NULL, if this node has no previous siblings

CPXML2560Syntax

Node* getPreviousSibling() const;

CPXML2561Returns

(Node*) the previous sibling node, or NULL

CPXML2562

hasAttributes()

Returns TRUE if this node has attributes, if it is an element. Otherwise, it returns FALSE. Note that for nodes that are not elements, it always returns FALSE.

CPXML2563Syntax

boolean hasAttributes() const;

CPXML2564Returns

(boolean) TRUE is this node is an element and has attributes

CPXML2565

hasChildNodes()

Tests if this node has children. Only Element, Document, DTD, and DocumentFragment nodes may have children.

CPXML2566Syntax

boolean hasChildNodes() const;

CPXML2567Returns

(boolean) TRUE if this node has any children

CPXML2568

insertBefore()

Inserts the node newChild before the existing child node refChild in this node. refChild must be a child of this node. If newChild is a DocumentFragment, all of its children are inserted (in the same order) before refChild; the DocumentFragment node itself is not. If newChild is already in the DOM tree, it is first removed from its current position.

CPXML2569Syntax

Node* insertBefore( 
   NodeRef& newChild, 
   NodeRef& refChild)
throw (DOMException);
Parameter Description
newChild
new node
refChild
reference node

CPXML2570Returns

(Node*) the node being inserted

CPXML2571

isSupported()

Tests if the feature, specified by the arguments, is supported by the DOM implementation of this node.

CPXML2572Syntax

boolean isSupported( 
   oratext* feature, 
   oratext* version) const;
Parameter Description
feature
package name of feature
version
version of package

CPXML2573Returns

(boolean) TRUE is specified feature is supported

CPXML2574

markToDelete()

Sets the mark indicating that the referenced node should be deleted at the time when destructor of this reference is called. All other references to the node become invalid. This behavior is inherited by all other reference classes. This member function is Oracle extension.

CPXML2575Syntax

void markToDelete();
CPXML2576

normalize()

"Normalizes" the subtree rooted at an element, merges adjacent Text nodes children of elements. Note that adjacent Text nodes will never be created during a normal parse, only after manipulation of the document with DOM calls.

CPXML2577Syntax

void normalize();
CPXML2578

removeChild()

Removes the node from this node's list of children and returns it. The node is orphaned; its parent will be NULL after removal.

CPXML2579Syntax

Node* removeChild( 
   NodeRef& oldChild) 
throw (DOMException);
Parameter Description
oldChild
old node

CPXML2580Returns

(Node*) node removed

CPXML2581

replaceChild()

Replaces the child node oldChild with the new node newChild in this node's children list, and returns oldChild (which is now orphaned, with a NULL parent). If newChild is a DocumentFragment, all of its children are inserted in place of oldChild; the DocumentFragment node itself is not. If newChild is already in the DOM tree, it is first removed from its current position.

CPXML2582Syntax

Node* replaceChild( 
   NodeRef& newChild, 
   NodeRef& oldChild)
throw (DOMException);
Parameter Description
newChild
new node
oldChild
old node

CPXML2583Returns

(Node*) the node replaced

CPXML2584

resetNode()

This function resets NodeRef to reference Node given as an argument

CPXML2585Syntax

void resetNode( 
   Node* nptr);
Parameter Description
nptr
reference node

CPXML2586

setNodeValue()

Sets a node's value (character data) as a NULL-terminated string. Does not allow setting the value to NULL. Only Attr, CDATA, Comment, ProcessingInstruction, and Text nodes have values. Trying to set the value of another kind of node is a no-op. The new value must be in the data encoding! It is not verified, converted, or checked. The value is not copied, its pointer is just stored. The user is responsible for persistence and freeing of that data.

It throws the NO_MODIFICATION_ALLOWED_ERR exception, if no modifications are allowed, or UNDEFINED_ERR, with an appropriate Oracle XML error code (see xml.h), in the case of an implementation defined error.

CPXML2587Syntax

void setNodeValue( 
   oratext* data) 
throw (DOMException);
Parameter Description
data
new value for node

CPXML2588

setPrefix()

Sets the namespace prefix of this node (as NULL-terminated string). Does not verify the prefix is defined! And does not verify that the prefix is in the current data encoding. Just causes a new qualified name to be formed from the new prefix and the old local name.

It throws the NO_MODIFICATION_ALLOWED_ERR exception, if no modifications are allowed. Or it throws NAMESPACE_ERR if the namespaceURI of this node is NULL, or if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", or if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/". Note that the INVALID_CHARACTER_ERR exception is never thrown since it is not checked how the prefix is formed

CPXML2589Syntax

void setPrefix( 
   oratext* prefix) 
throw (DOMException);
Parameter Description
prefix
new namespace prefix

CPXML2590

~NodeRef()

This is the default destructor. It cleans the reference to the node and, if the node is marked for deletion, deletes the node. If the node was marked for deep deletion, the tree under the node is also deleted (deallocated). It is usually called by the environment. But it can be called by the user directly if necessary.

CPXML2591Syntax

~NodeRef();
CPXML01320

NotationRef Interface

Table 2-22 summarizes the methods available through NotationRef interface.

CPXML2592Table 2-22 Summary of NotationRef Methods; Dom Package

Function Summary

NotationRef()

Constructor.

getPublicId()

Get public ID.

getSystemId()

Get system ID.

~NotationRef()

Public default destructor.


CPXML2593

NotationRef()

Class constructor.

Syntax Description
NotationRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given notation node after a call to create Notation.
NotationRef(
   const NotationRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2594Returns

(NotationRef) Node reference object

CPXML2595

getPublicId()

Get public id.

CPXML2596Syntax

oratext* getPublicId() const;

CPXML2597Returns

(oratext*) public ID

CPXML2598

getSystemId()

Get system id.

CPXML2599Syntax

oratext* getSystemId() const;

CPXML2600Returns

(oratext*) system ID

CPXML2601

~NotationRef()

This is the default destructor.

CPXML2602Syntax

~NotationRef();
CPXML01330

ProcessingInstructionRef Interface

Table 2-23 summarizes the methods available through ProcessingInstructionRef interface.

CPXML2603Table 2-23 Summary of ProcessingInstructionRef Methods; Dom Package

Function Summary

ProcessingInstructionRef()

Constructor.

getData()

Get processing instruction's data.

getTarget()

Get processing instruction's target.

setData()

Set processing instruction's data.

~ProcessingInstructionRef()

Public default destructor.


CPXML2604

ProcessingInstructionRef()

Class constructor.

Syntax Description
ProcessingInstructionRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given ProcessingInstruction node after a call to create ProcessingInstruction.
ProcessingInstructionRef(
   const ProcessingInstructionRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2605Returns

(ProcessingInstructionRef) Node reference object

CPXML2606

getData()

Returns the content (data) of a processing instruction (in the data encoding). The content is the part from the first non-whitespace character after the target until the ending "?>".

CPXML2607Syntax

oratext* getData() const;

CPXML2608Returns

(oratext*) processing instruction's data

CPXML2609

getTarget()

Returns a processing instruction's target string. The target is the first token following the markup that begins the ProcessingInstruction. All ProcessingInstructions must have a target, though the data part is optional.

CPXML2610Syntax

oratext* getTarget() const;

CPXML2611Returns

(oratext*) processing instruction's target

CPXML2612

setData()

Sets processing instruction's data (content), which must be in the data encoding. It is not permitted to set the data to NULL. The new data is not verified, converted, or checked.

CPXML2613Syntax

void setData( 
   oratext* data) 
throw (DOMException);
Parameter Description
data
new data

CPXML2614

~ProcessingInstructionRef()

This is the default destructor.

CPXML2615Syntax

~ProcessingInstructionRef();
CPXML01340

Range Interface

Table 2-24 summarizes the methods available through Range interface.

CPXML2616Table 2-24 Summary of Range Methods; Dom Package

Function Summary

CompareBoundaryPoints()

 

cloneContent()

 

cloneRange()

 

deleteContents()

 

detach()

Invalidate the range.

extractContent()

 

getCollapsed()

Check if the range is collapsed.

getCommonAncestorContainer()

Get the deepest common ancestor node.

getEndContainer()

Get end container node.

getEndOffset()

Get offset of the end point.

getStartContainer()

Get start container node.

getStartOffset()

Get offset of the start point.

insertNode()

 

selectNodeContent()

 

selectNode()

 

setEnd()

Set end point.

setEndAfter()

 

setEndBefore()

 

setStart()

Set start point.

setStartAfter()

 

setStartBefore()

 

surroundContents()

 

toString()

 

CPXML2617

CompareBoundaryPoints()

Compares boundary points.

CPXML2618Syntax

CompareHowCode compareBoundaryPoints( 
   unsigned short how,
   Range< Node>* sourceRange)
throw (DOMException);
Parameter Description
how
how to compare
sourceRange
range of comparison

CPXML2619Returns

(CompareHowCode) result of comparison

CPXML2620

cloneContent()

Makes a clone of the node, including its children.

CPXML2621Syntax

Node* cloneContents() throw (DOMException);

CPXML2622Returns

(Node*) subtree cloned

CPXML2623

cloneRange()

Clones a range of nodes.

CPXML2624Syntax

Range< Node>* cloneRange();

CPXML2625Returns

(Range< Node>*) new cloned range

CPXML2626

deleteContents()

Deletes contents of the node.

CPXML2627Syntax

void deleteContents() throw (DOMException);
CPXML2628

detach()

Invalidates the range. It is not recommended to use this method since it leaves the object in invalid state. The preferable way is to call the destructor.

CPXML2629Syntax

void detach();
CPXML2630

extractContent()

Extract the node.

CPXML2631Syntax

Node* extractContents() throw (DOMException);

CPXML2632Returns

(Node*) subtree extracted

CPXML2633

getCollapsed()

Checks if the range is collapsed.

CPXML2634Syntax

boolean getCollapsed() const;

CPXML2635Returns

(boolean) TRUE if the range is collapsed, FALSE otherwise

CPXML2636

getCommonAncestorContainer()

Get the deepest common ancestor of the node.

CPXML2637Syntax

Node* getCommonAncestorContainer() const;

CPXML2638Returns

(Node*) common ancestor node

CPXML2639

getEndContainer()

Gets the container node.

CPXML2640Syntax

Node* getEndContainer() const;

CPXML2641Returns

(Node*) end container node

CPXML2642

getEndOffset()

Get offset of the end point.

CPXML2643Syntax

long getEndOffset() const;

CPXML2644Returns

(long) offset

CPXML2645

getStartContainer()

Get start container node.

CPXML2646Syntax

Node* getStartContainer() const;

CPXML2647Returns

(Node*) start container node

CPXML2648

getStartOffset()

Get offset of the start point.

CPXML2649Syntax

long getStartOffset() const;

CPXML2650Returns

(long) offset

CPXML2651

insertNode()

Inserts a node.

CPXML2652Syntax

void insertNode( 
   NodeRef< Node>& newNode)
throw (RangeException, DOMException);
Parameter Description
newNode
inserted node

CPXML2653

selectNodeContent()

Selects node content by its reference.

CPXML2654Syntax

void selectNodeContent( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node

CPXML2655

selectNode()

Selects a node.

CPXML2656Syntax

void selectNode( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node

CPXML2657

setEnd()

Sets an end point.

CPXML2658Syntax

void setEnd( 
   NodeRef< Node>& refNode, 
   long offset)
throw (RangeException, DOMException);
Parameter Description
refNode
reference node
offset
offset

CPXML2659

setEndAfter()

Sets the end pointer after a specified node.

CPXML2660Syntax

void setEndAfter( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node

CPXML2661

setEndBefore()

Set the end before a specified node.

CPXML2662Syntax

void setEndBefore( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node

CPXML2663

setStart()

Sets start point.

CPXML2664Syntax

void setStart( 
   NodeRef< Node>& refNode, 
   long offset)
throw (RangeException, DOMException);
Parameter Description
refNode
reference node
offset
offset

CPXML2665

setStartAfter()

Sets start pointer after a specified node.

CPXML2666Syntax

void setStartAfter( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node

CPXML2667

setStartBefore()

Sets start pointer before a specified node.

CPXML2668Syntax

void setStartBefore( 
   NodeRef< Node>& refNode)
throw (RangeException);
Parameter Description
refNode
reference node

CPXML2669

surroundContents()

Makes a node into a child of the specified node.

CPXML2670Syntax

void surroundContents( 
   NodeRef< Node>& newParent)
throw (RangeException, DOMException);
Parameter Description
newParent
parent node

CPXML2671

toString()

Converts an item into a string.

CPXML2672Syntax

oratext* toString();

CPXML2673Returns

(oratext*) string representation of the range

CPXML01350

RangeException Interface

Table 2-25 summarizes the methods available through RangeException interface.

CPXML2674Table 2-25 Summary of RangeException Methods; Dom Package

Function Summary

getCode()

Get Oracle XML error code embedded in the exception.

getMesLang()

Get current language (encoding) of error messages.

getMessage()

Get Oracle XML error message.

getRangeCode()

Get Range exception code embedded in the exception.


CPXML2675

getCode()

Gets Oracle XML error code embedded in the exception. Virtual member function inherited from XmlException.

CPXML2676Syntax

virtual unsigned getCode() const = 0;

CPXML2677Returns

(unsigned) numeric error code (0 on success)

CPXML2678

getMesLang()

Gets the current language encoding of error messages. Virtual member function inherited from XmlException.

CPXML2679Syntax

virtual oratext* getMesLang() const = 0;

CPXML2680Returns

(oratext*) Current language (encoding) of error messages

CPXML2681

getMessage()

Get XML error message. Virtual member function inherited from XmlException.

CPXML2682Syntax

virtual oratext* getMessage() const = 0;

CPXML2683Returns

(oratext *) Error message

CPXML2684

getRangeCode()

This is a virtual member function that defines a prototype for implementation defined member functions returning Range exception codes, defined in RangeExceptionCode, of the exceptional situations during execution.

CPXML2685Syntax

virtual RangeExceptionCode getRangeCode() const = 0;

CPXML2686Returns

(RangeExceptionCode) exception code

CPXML01360

TextRef Interface

Table 2-26 summarizes the methods available through TextRef interface.

CPXML2687Table 2-26 Summary of TextRef Methods; Dom Package

Function Summary

TextRef()

Constructor.

splitText()

Split text node into two.

~TextRef()

Public default destructor.


CPXML2688

TextRef()

Class constructor.

Syntax Description
TextRef(
   const NodeRef< Node>& node_ref,
   Node* nptr);
Used to create references to a given text node after a call to createtext.
TextRef(
   const TextRef< Node>& nref);
Copy constructor.

Parameter Description
node_ref
reference to provide the context
nptr
referenced node

CPXML2689Returns

(TextRef) Node reference object

CPXML2690

splitText()

Splits a single text node into two text nodes; the original data is split between them. The offset is zero-based, and is in characters, not bytes. The original node is retained, its data is just truncated. A new text node is created which contains the remainder of the original data, and is inserted as the next sibling of the original. The new text node is returned.

CPXML2691Syntax

Node* splitText( 
   ub4 offset) 
throw (DOMException);
Parameter Description
offset
character offset where to split text

CPXML2692Returns

(Node*) new node

CPXML2693

~TextRef()

This is the default destructor.

CPXML2694Syntax

~TextRef();
CPXML01370

TreeWalker Interface

Table 2-27 summarizes the methods available through TreeWalker interface.

CPXML2695Table 2-27  Summary of TreeWalker Methods; Dom Package

Function Summary

adjustCtx()

Attach this tree walker to another context.

firstChild()

Get the first child of the current node.

lastChild()

Get the last child of the current node.

nextNode()

Get the next node.

nextSibling()

Get the next sibling node.

parentNode()

Get the parent of the current node.

previousNode()

Get the previous node.

previousSibling()

Get the previous sibling node.


CPXML2696

adjustCtx()

Attaches this tree walker to the context associated with a given node reference

CPXML2697Syntax

void adjustCtx( 
   NodeRef< Node>& nref);
Parameter Description
nref
reference to provide the context

CPXML2698

firstChild()

Get the first child of the current node.

CPXML2699Syntax

Node* firstChild();

CPXML2700Returns

(Node*) pointer to first child node

CPXML2701

lastChild()

Get the last child of the current node.

CPXML2702Syntax

Node* lastChild();

CPXML2703Returns

(Node*) pointer to last child node

CPXML2704

nextNode()

Get the next node.

CPXML2705Syntax

Node* nextNode();

CPXML2706Returns

(Node*) pointer to the next node

CPXML2707

nextSibling()

Get the next sibling node.

CPXML2708Syntax

Node* nextSibling();

CPXML2709Returns

(Node*) pointer to the next sibling node

CPXML2710

parentNode()

Get the parent of the current node.

CPXML2711Syntax

Node* parentNode();

CPXML2712Returns

(Node*) pointer to the parent node

CPXML2713

previousNode()

Get the previous node.

CPXML2714Syntax

Node* previousNode();

CPXML2715Returns

(Node*) pointer to previous node

CPXML2716

previousSibling()

Get the previous sibling node.

CPXML2717Syntax

Node* previousSibling();

CPXML2718Returns

(Node*) pointer to the previous sibling node

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

  • Using Dom
  • Dom Datatypes
    • AcceptNodeCodes
    • CompareHowCode
    • DOMNodeType
    • DOMExceptionCode
    • WhatToShowCode
    • RangeExceptionCode
  • AttrRef Interface
    • AttrRef()
    • getName()
    • getOwnerElement()
    • getSpecified()
    • getValue()
    • setValue()
    • ~AttrRef()
  • CDATASectionRef Interface
    • CDATASectionRef()
    • ~CDATASectionRef()
  • CharacterDataRef Interface
    • appendData()
    • deleteData()
    • freeString()
    • getData()
    • getLength()
    • insertData()
    • replaceData()
    • setData()
    • substringData()
  • CommentRef Interface
    • CommentRef()
    • ~CommentRef()
  • DOMException Interface
    • getDOMCode()
    • getMesLang()
    • getMessage()
  • DOMImplRef Interface
    • DOMImplRef()
    • createDocument()
    • createDocumentType()
    • formDocument()
    • getImplementation()
    • getNoMod()
    • hasFeature()
    • setContext()
    • ~DOMImplRef()
  • DOMImplementation Interface
    • DOMImplementation()
    • getNoMod()
    • ~DOMImplementation()
  • DocumentFragmentRef Interface
    • DocumentFragmentRef()
    • ~DocumentFragmentRef()
  • DocumentRange Interface
    • DocumentRange()
    • createRange()
    • destroyRange()
    • ~DocumentRange()
  • DocumentRef Interface
    • DocumentRef()
    • createAttribute()
    • createAttributeNS()
    • createCDATASection()
    • createComment()
    • createDocumentFragment()
    • createElement()
    • createElementNS()
    • createEntityReference()
    • createProcessingInstruction()
    • createTextNode()
    • getDoctype()
    • getDocumentElement()
    • getElementById()
    • getElementsByTagName()
    • getElementsByTagNameNS()
    • getImplementation()
    • importNode()
    • ~DocumentRef()
  • DocumentTraversal Interface
    • DocumentTraversal()
    • createNodeIterator()
    • createTreeWalker()
    • destroyNodeIterator()
    • destroyTreeWalker()
    • ~DocumentTraversal()
  • DocumentTypeRef Interface
    • DocumentTypeRef()
    • getEntities()
    • getInternalSubset()
    • getName()
    • getNotations()
    • getPublicId()
    • getSystemId()
    • ~DocumentTypeRef()
  • ElementRef Interface
    • ElementRef()
    • getAttribute()
    • getAttributeNS()
    • getAttributeNode()
    • getElementsByTagName()
    • getTagName()
    • hasAttribute()
    • hasAttributeNS()
    • removeAttribute()
    • removeAttributeNS()
    • removeAttributeNode()
    • setAttribute()
    • setAttributeNS()
    • setAttributeNode()
    • ~ElementRef()
  • EntityRef Interface
    • EntityRef()
    • getNotationName()
    • getPublicId()
    • getSystemId()
    • getType()
    • ~EntityRef()
  • EntityReferenceRef Interface
    • EntityReferenceRef()
    • ~EntityReferenceRef()
  • NamedNodeMapRef Interface
    • NamedNodeMapRef()
    • getLength()
    • getNamedItem()
    • getNamedItemNS()
    • item()
    • removeNamedItem()
    • removeNamedItemNS()
    • setNamedItem()
    • setNamedItemNS()
    • ~NamedNodeMapRef()
  • NodeFilter Interface
    • acceptNode()
  • NodeIterator Interface
    • adjustCtx()
    • detach()
    • nextNode()
    • previousNode()
  • NodeListRef Interface
    • NodeListRef()
    • getLength()
    • item()
    • ~NodeListRef()
  • NodeRef Interface
    • NodeRef()
    • appendChild()
    • cloneNode()
    • getAttributes()
    • getChildNodes()
    • getFirstChild()
    • getLastChild()
    • getLocalName()
    • getNamespaceURI()
    • getNextSibling()
    • getNoMod()
    • getNodeName()
    • getNodeType()
    • getNodeValue()
    • getOwnerDocument()
    • getParentNode()
    • getPrefix()
    • getPreviousSibling()
    • hasAttributes()
    • hasChildNodes()
    • insertBefore()
    • isSupported()
    • markToDelete()
    • normalize()
    • removeChild()
    • replaceChild()
    • resetNode()
    • setNodeValue()
    • setPrefix()
    • ~NodeRef()
  • NotationRef Interface
    • NotationRef()
    • getPublicId()
    • getSystemId()
    • ~NotationRef()
  • ProcessingInstructionRef Interface
    • ProcessingInstructionRef()
    • getData()
    • getTarget()
    • setData()
    • ~ProcessingInstructionRef()
  • Range Interface
    • CompareBoundaryPoints()
    • cloneContent()
    • cloneRange()
    • deleteContents()
    • detach()
    • extractContent()
    • getCollapsed()
    • getCommonAncestorContainer()
    • getEndContainer()
    • getEndOffset()
    • getStartContainer()
    • getStartOffset()
    • insertNode()
    • selectNodeContent()
    • selectNode()
    • setEnd()
    • setEndAfter()
    • setEndBefore()
    • setStart()
    • setStartAfter()
    • setStartBefore()
    • surroundContents()
    • toString()
  • RangeException Interface
    • getCode()
    • getMesLang()
    • getMessage()
    • getRangeCode()
  • TextRef Interface
    • TextRef()
    • splitText()
    • ~TextRef()
  • TreeWalker Interface
    • adjustCtx()
    • firstChild()
    • lastChild()
    • nextNode()
    • nextSibling()
    • parentNode()
    • previousNode()
    • previousSibling()

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF