Table 15-17 summarizes the methods of available through NamedNodeMapRef
interface.
Table 15-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. |
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 |
(NamedNodeMapRef)
Node
reference object
Get the length of the map.
ub4 getLength() const;
(ub4)
map's length
Get the name of the item, given its name.
Node* getNamedItem( oratext* name) const;
Parameter | Description |
---|---|
name |
name of item |
(Node*)
pointer to the item
Get the name of the item, given its namespace URI and local name.
Node* getNamedItemNS( oratext* namespaceURI, oratext* localName) const;
Parameter | Description |
---|---|
namespaceURI |
namespace URI of item |
localName |
local name of item |
(Node*)
pointer to the item
Get item, given its index.
Node* item( ub4 index) const;
Parameter | Description |
---|---|
index |
index of item |
(Node*)
pointer to the item
Remove the item from the map, given its name.
Node* removeNamedItem( oratext* name) throw (DOMException);
Parameter | Description |
---|---|
name |
name of item |
(Node*)
pointer to the removed item
Remove the item from the map, given its namespace URI and local name.
Node* removeNamedItemNS( oratext* namespaceURI, oratext* localName) throw (DOMException);
Parameter | Description |
---|---|
namespaceURI |
namespace URI of item |
localName |
local name of item |
(Node*)
pointer to the removed item
Add new item to the map.
Node* setNamedItem( NodeRef< Node>& newItem) throw (DOMException);
Parameter | Description |
---|---|
newItem |
item set to the map |
(Node*)
pointer to new item
Set named item, which is namespace aware, to the map.
Node* setNamedItemNS( NodeRef< Node>& newItem) throw (DOMException);
Parameter | Description |
---|---|
newItem |
item set to the map |
(Node*)
pointer to the item
Default destructor.
~NamedNodeMapRef();