Magazine |
| | Community |
| | Workshop |
| | Tools & Samples |
| | Training |
| | Site Info |
|
|
||||||||
|
The IDOMNamedNodeMap object provides access to attributes by attribute name.
Remarks
The NamedNodeMap object is a node collection that allows access by name as well as by index. This collection is typically used for attributes.
Note that the World Wide Web Consortium (W3C) document object model (DOM) definition does not require IDOMNamedNodeMap objects to be maintained in any particular order. Objects contained in an object implementing NamedNodeMap can also be accessed by an ordinal index, but this is simply to allow convenient enumeration and does not imply that the DOM specifies an order to these nodes. DOM implementations are not required to preserve the node order.
The Microsoft implementation preserves the attributes in the order in which they appear in the source. Additional attributes are added to the end of the list. Note that a namespace (xmlns) attribute is inserted as the first in the list if the tag name requires the namespace, or immediately before the attribute that uses an undeclared namespace.
Like the node list, however, a NamedNodeMap collection is live; that is, the addition and removal of nodes, and changes within nodes, are immediately reflected in the collection. This means that two successive requests for items using the same index can return two different items, depending on changes to the collection. This also means that changes to the node objects are immediately available in the nodes obtained from the list.
Members
See Also
Does this content meet your programming needs? Write us!
© 1998 Microsoft Corporation. All rights reserved. Terms of use.