XML DOM - Objekt NamedNodeMap
Objekt NamedNodeMap představuje neuspořádaný seznam uzlů.
Objekt NamedNodeMap
K uzlům v NamedNodeMap lze přistupovat prostřednictvím jejich názvu.
NamedNodeMap se udržuje aktuální. Pokud je prvek odstraněn nebo přidán v seznamu uzlů nebo dokumentu XML, seznam se automaticky aktualizuje.
Poznámka: V mapě pojmenovaných uzlů nejsou uzly vráceny v žádném konkrétním pořadí.
Vlastnosti objektu NamedNodeMap
Property | Description |
---|---|
length | Returns the number of nodes in the list |
Metody objektu NamedNodeMap
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) |