xmldom::DomNamedNodeMap Class Reference

#include <DomNamedNodeMap.h>

List of all members.


Detailed Description

DomNamedNodeMaps are used to represent collections of nodes that can be accessed by name.

Note that DomNamedNodeMap does not inherit from DomNodeList. DomNamedNodeMaps are not maintained in any particular order. Nodes contained in a DomNamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents, and does not imply that the DOM specifies an order to these Nodes.

See also:
More Informations About the DOM 3 standard.


Public Member Functions

 DomNamedNodeMap ()
 ctor
 DomNamedNodeMap (const DomNamedNodeMap &copy)
 copy ctor
virtual ~DomNamedNodeMap ()
 dtor
const DomNamedNodeMapoperator= (const DomNamedNodeMap &assign)
 assign
DOM Level 1
DomNode setNamedItem (const DomNode &arg)
 Adds a node using its nodeName attribute.
DomNode getItem (XmlSize index) const
 Returns the index'th item in the map.
DomNode getNamedItem (const DomString &name) const
 Retrieves a node specified by name.
XmlSize getLength () const
 The number of nodes in the map.
DomNode removeNamedItem (const DomString &name)
 Removes a node specified by name.
DOM Level 2
DomNode getNamedItemNS (const DomString &namespaceURI, const DomString &localName) const
 Retrieves a node specified by local name and namespace URI.
DomNode setNamedItemNS (const DomNode &arg)
 Adds a node using its namespaceURI and localName.
DomNode removeNamedItemNS (const DomString &namespaceURI, const DomString &localName)
 Removes a node specified by local name and namespace URI.
Extensions
bool isNull () const
 Check if this map is a "null" map.


Constructor & Destructor Documentation

xmldom::DomNamedNodeMap::DomNamedNodeMap (  ) 

ctor

xmldom::DomNamedNodeMap::DomNamedNodeMap ( const DomNamedNodeMap copy  ) 

copy ctor

xmldom::DomNamedNodeMap::~DomNamedNodeMap (  )  [virtual]

dtor


Member Function Documentation

const DomNamedNodeMap & xmldom::DomNamedNodeMap::operator= ( const DomNamedNodeMap assign  ) 

assign

DomNode xmldom::DomNamedNodeMap::setNamedItem ( const DomNode arg  ) 

Adds a node using its nodeName attribute.

As the nodeName attribute is used to derive the name which the node must be stored under, multiple nodes of certain types (those that have a "special" string value) cannot be stored as the names would clash. This is seen as preferable to allowing nodes to be aliased.

Parameters:
arg A node to store in a named node map. The node will later be accessible using the value of the nodeName attribute of the node. If a node with that name is already present in the map, it is replaced by the new one.
Returns:
If the new DOMNode replaces an existing node the replaced DomNode is returned, otherwise null is returned.

DomNode xmldom::DomNamedNodeMap::getItem ( XmlSize  index  )  const

Returns the index'th item in the map.

If index is greater than or equal to the number of nodes in the map, this returns null.

Parameters:
index Index into the map.
Returns:
The node at the index position in the DomNamedNodeMap, or null if that is not a valid index.

DomNode xmldom::DomNamedNodeMap::getNamedItem ( const DomString name  )  const

Retrieves a node specified by name.

Parameters:
name The nodeName of a node to retrieve.
Returns:
A DomNode (of any type) with the specified nodeName, or null if it does not identify any node in the map.

XmlSize xmldom::DomNamedNodeMap::getLength (  )  const

The number of nodes in the map.

The range of valid child node indices is 0 to length-1 inclusive.

DomNode xmldom::DomNamedNodeMap::removeNamedItem ( const DomString name  ) 

Removes a node specified by name.

If the removed node is an DomAttribute with a default value it is immediately replaced.

Parameters:
name The nodeName of a node to remove.
Returns:
The node removed from the map if a node with such a name exists.

DomNode xmldom::DomNamedNodeMap::getNamedItemNS ( const DomString namespaceURI,
const DomString localName 
) const

Retrieves a node specified by local name and namespace URI.

Parameters:
namespaceURI The namespace URI of the node to retrieve.
localName The local name of the node to retrieve.
Returns:
A DomNode (of any type) with the specified local name and namespace URI, or null if they do not identify any node in the map.

DomNode xmldom::DomNamedNodeMap::setNamedItemNS ( const DomNode arg  ) 

Adds a node using its namespaceURI and localName.

Parameters:
arg A node to store in a named node map. The node will later be accessible using the value of the namespaceURI and localName attribute of the node. If a node with those namespace URI and local name is already present in the map, it is replaced by the new one.
Returns:
If the new DOMNode replaces an existing node the replaced DomNode is returned, otherwise null is returned.

DomNode xmldom::DomNamedNodeMap::removeNamedItemNS ( const DomString namespaceURI,
const DomString localName 
)

Removes a node specified by local name and namespace URI.

Parameters:
namespaceURI The namespace URI of the node to remove.
localName The local name of the node to remove. When this DomNamedNodeMap contains the attributes attached to an element, as returned by the attributes attribute of the DomNode interface, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix.
Returns:
The node removed from the map if a node with such a local name and namespace URI exists.

bool xmldom::DomNamedNodeMap::isNull (  )  const

Check if this map is a "null" map.


The documentation for this class was generated from the following files:
Generated on Fri May 30 11:15:13 2008 for XMLDOM by  doxygen 1.5.2