XML DOM - L' oggetto NamedNodeMap
L'oggetto NamedNodeMap rappresenta un elenco non ordinato di nodi.
L'oggetto NamedNodeMap
È possibile accedere ai nodi nella NamedNodeMap tramite il loro nome.
NamedNodeMap si mantiene aggiornato. Se un elemento viene eliminato o aggiunto, nell'elenco dei nodi o nel documento XML, l'elenco viene aggiornato automaticamente.
Nota: in una mappa di nodi denominata, i nodi non vengono restituiti in un ordine particolare.
Proprietà dell'oggetto NamedNodeMap
Property | Description |
---|---|
length | Returns the number of nodes in the list |
Metodi dell'oggetto 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) |