class DOM_NamedNodeMap
NamedNodeMaps are used to
represent collections of nodes that can be accessed by name
| | @Comparisons | ||||||
| | Constructors and assignment operator
| ||||||
| | Destructor.
| ||||||
| | Functions introduced in DOM Level 2.
| ||||||
| | Functions to change the node collection.
| ||||||
| | Get functions.
| ||||||
| | Set functions.
|
NamedNodeMaps are used to represent collections of nodes that can be accessed by name. Note thatNamedNodeMapdoes not inherit fromNodeList;NamedNodeMaps are not maintained in any particular order. Nodes contained in aNamedNodeMapmay 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.
DOM_NamedNodeMap(const DOM_NamedNodeMap &other)
DOM_NamedNodeMap reference object
that refers to the same underlying NamedNodeMap as the original.
DOM_NamedNodeMap& operator = (const DOM_NamedNodeMap &other)
Like most other DOM types in this implementation, memory management of named node maps is automatic. Instances of DOM_NamedNodeMap function as references to an underlying heap based implementation object, and should never be explicitly new-ed or deleted in application code, but should appear only as local variables or function parameters.
Set functions.
DOM_Node setNamedItem(DOM_Node arg)
nodeName.
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.
arg was created from a
different document than the one that created the
NamedNodeMap.
NO_MODIFICATION_ALLOWED_ERR: Raised if this
NamedNodeMap is readonly.
INUSE_ATTRIBUTE_ERR: Raised if arg is an
Attr that is already an attribute of another
Element object. The DOM user must explicitly clone
Attr nodes to re-use them in other elements.Node replaces an existing node with the
same name the previously existing Node is returned,
otherwise null is returned.
nodeName attribute of
the node. If a node with that name is already present in the map, it
is replaced by the new one.
DOM_Node item(int index)
indexth item in the map.
If index
is greater than or equal to the number of nodes in the map, this returns
null.
indexth position in the
NamedNodeMap, or null if that is not a valid
index.
Get functions.
DOM_Node getNamedItem(const DOMString &name)
Node (of any type) with the specified name, or
null DOM_Node if the specified name did not identify any node in
the map.
int getLength()
length-1 inclusive.
Functions to change the node collection.
DOM_Node removeNamedItem(const DOMString &name)
Attr with a default value it is immediately replaced.
name in
the map.null if no node
with such a name exists.
Functions introduced in DOM Level 2.
DOM_Node getNamedItemNS(const DOMString &namespaceURI, const DOMString &localName)
DOM_Node (of any type) with the specified
name, or null if the specified name did not
identify any node in the map.
null or an empty
string, this method behaves like getNamedItem.
localName - The local name of the node to retrieve.
DOM_Node removeNamedItemNS(const DOMString &namespaceURI, const DOMString &name)
name in
the map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this NamedNodeMap
is readonly.null or an empty
string, this method behaves like removeNamedItem.
name - The local name of the
node to remove. When this DOM_NamedNodeMap contains the
attributes attached to an element, as returned by the attributes
attribute of the DOM_Node interface, if the removed
attribute is known to have a default value, an attribute
immediately appears containing the default value.
alphabetic index hierarchy of classes
| XML Parser for C++ 2.0 Copyright © IBM Corp, 1999 Center for Java Technology 10275 N. De Anza Blvd. Cupertino CA 95014 USA Email: xml4c@us.ibm.com |
|
generated by doc++