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

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

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

AttrRef Interface

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

Table 2-2 Summary of TreeWalker 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.



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

Returns

(AttrRef) Node reference object


getName()

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

Syntax

 oratext* getName() const;

Returns

(oratext *) name of attribute


getOwnerElement()

Returns attribute's owning element

Syntax

Node* getOwnerElement();

Returns

(Node*) attribute's owning element node.


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.

Syntax

boolean getSpecified() const;

Returns

(boolean) attribute's "specified" value


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.

Syntax

oratext* getValue() const;

Returns

(oratext*) attribute's value


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.

Syntax

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


~AttrRef()

This is the default destructor.

Syntax

~AttrRef();