XML DOM – Das NamedNodeMap- Objekt
Das NamedNodeMap-Objekt repräsentiert eine ungeordnete Liste von Knoten.
Das NamedNodeMap-Objekt
Auf die Knoten in der NamedNodeMap kann über ihren Namen zugegriffen werden.
Die NamedNodeMap hält sich selbst aktuell. Wenn ein Element in der Knotenliste oder im XML-Dokument gelöscht oder hinzugefügt wird, wird die Liste automatisch aktualisiert.
Hinweis: In einer benannten Knotenzuordnung werden die Knoten nicht in einer bestimmten Reihenfolge zurückgegeben.
NamedNodeMap-Objekteigenschaften
Property | Description |
---|---|
length | Returns the number of nodes in the list |
NamedNodeMap-Objektmethoden
Method | Description |
---|---|
getNamedItem() | Returns the node with the specific name |
getNamedItemNS() | Returns the node with the specific name and namespace |
item() | Returns the node at the specified index |
removeNamedItem() | Removes the node with the specific name |
removeNamedItemNS() | Removes the node with the specific name and namespace |
setNamedItem() | Sets the specified node (by name) |
setNamedItemNS() | Sets the specified node (by name and namespace) |