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(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)
DOM_NamedNodeMap& operator = (const DOM_NullPtr *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.
bool operator != (const DOM_NamedNodeMap &other) const
bool operator == (const DOM_NullPtr *p) const
bool operator != (const DOM_NullPtr *p) const
nodeName
attribute.
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
.
NamedNodeMap
is readonly.
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 the
replaced 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.
DOM_Node getNamedItem(const DOMString &name)
DOM_Node
(of any type) with the specified nodeName
, or
null
if it does not identify any node in
the map.
nodeName
of a node to retrieve.
unsigned int getLength() const
length-1
inclusive.
Attr
with a default value it is immediately replaced.
name
in
the map.
NamedNodeMap
is readonly.null
if no node
with such a name exists.
nodeName
of a node to remove.
"Experimental - subject to change"
DOM_Node
(of any type) with the specified
local name and namespace URI, or null
if they do not
identify any node in the map.
"Experimental - subject to change"
"Experimental - subject to change" DOM_Node setNamedItemNS(DOM_Node arg)
namespaceURI
and localName
.
arg
was created from a
different document than the one that created the
DOM_NamedNodeMap
.
NO_MODIFICATION_ALLOWED_ERR: Raised if this
vNamedNodeMap
is readonly.
INUSE_ATTRIBUTE_ERR: Raised if arg
is an
DOM_Attr
that is already an attribute of another
DOM_Element
object. The DOM user must explicitly clone
DOM_Attr
nodes to re-use them in other elements.DOM_Node
replaces an existing node the
replaced DOM_Node
is returned,
otherwise null
is returned.
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.
DOM_Node removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName)
name
in
the map.
NO_MODIFICATION_ALLOWED_ERR: Raised if this DOM_NamedNodeMap
is readonly.
localName - 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
as well as the corresponding namespace URI, local name, and prefix.
alphabetic index hierarchy of classes
Xerces-C XML Parser for C++ Version 1.1 |
|
generated by doc++