XML DOM - Het NamedNodeMap- object
Het NamedNodeMap-object vertegenwoordigt een ongeordende lijst met knooppunten.
Het NamedNodeMap-object
De knooppunten in de NamedNodeMap zijn toegankelijk via hun naam.
De NamedNodeMap houdt zichzelf up-to-date. Als een element wordt verwijderd of toegevoegd, in de knooppuntenlijst of het XML-document, wordt de lijst automatisch bijgewerkt.
Opmerking: In een benoemde knooppuntkaart worden de knooppunten niet in een bepaalde volgorde geretourneerd.
NamedNodeMap-objecteigenschappen
Property | Description |
---|---|
length | Returns the number of nodes in the list |
NamedNodeMap-objectmethoden
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) |