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  

AttrRef Interface

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

Table 15-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();