XML DOM - NamedNodeMap 객체
NamedNodeMap 개체는 순서가 지정되지 않은 노드 목록을 나타냅니다.
NamedNodeMap 객체
NamedNodeMap의 노드는 이름을 통해 액세스할 수 있습니다.
NamedNodeMap은 최신 상태를 유지합니다. 노드 목록이나 XML 문서에서 요소가 삭제되거나 추가되면 목록이 자동으로 업데이트됩니다.
참고: 명명된 노드 맵에서 노드는 특정 순서로 반환되지 않습니다.
NamedNodeMap 개체 속성
Property | Description |
---|---|
length | Returns the number of nodes in the list |
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) |