NamedNodeMap
s 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.
|
NamedNodeMap
s are used to represent collections of nodes that can be accessed by name. Note thatNamedNodeMap
does not inherit fromNodeList
;NamedNodeMap
s are not maintained in any particular order. Nodes contained in aNamedNodeMap
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.
DOM_NamedNodeMap
reference object
that refers to the same underlying NamedNodeMap as the original.
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.
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.
index
th item in the map.
If index
is greater than or equal to the number of nodes in the map, this returns
null
.
index
th position in the
NamedNodeMap
, or null
if that is not a valid
index.
Node
(of any type) with the specified name, or
null DOM_Node
if the specified name did not identify any node in
the map.
length-1
inclusive.
Attr
with a default value it is immediately replaced.
name
in
the map.null
if no node
with such a name exists.
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.
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 |
|