XML DOM - Objek NamedNodeMap
Objek NamedNodeMap mewakili daftar node yang tidak berurutan.
Objek NamedNodeMap
Node di NamedNodeMap dapat diakses melalui namanya.
NamedNodeMap membuat dirinya tetap up-to-date. Jika sebuah elemen dihapus atau ditambahkan, dalam daftar simpul atau dokumen XML, daftar tersebut diperbarui secara otomatis.
Catatan: Dalam peta node bernama, node tidak dikembalikan dalam urutan tertentu.
Properti Objek NamedNodeMap
Property | Description |
---|---|
length | Returns the number of nodes in the list |
Metode Objek 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) |