public class DTMNamedNodeMap extends Object implements NamedNodeMap
***** Note: this does _not_ current attempt to cache any of the data; if you ask for attribute 27 and then 28, you'll have to rescan the first 27. It should probably at least keep track of the last one retrieved, and possibly buffer the whole array.
***** Also note that there's no fastpath for the by-name query; we search linearly until we find it or fail to find it. Again, that could be optimized at some cost in object creation/storage.
| Modifier and Type | Class and Description |
|---|---|
static class |
DTMNamedNodeMap.DTMException
Simple implementation of DOMException.
|
| Constructor and Description |
|---|
DTMNamedNodeMap(DTM dtm,
int element)
Create a getAttributes NamedNodeMap for a given DTM element node
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLength() |
Node |
getNamedItem(String name) |
Node |
getNamedItemNS(String namespaceURI,
String localName) |
Node |
item(int i) |
Node |
removeNamedItem(String name) |
Node |
removeNamedItemNS(String namespaceURI,
String localName) |
Node |
setNamedItem(Node newNode) |
Node |
setNamedItemNS(Node arg) |
public DTMNamedNodeMap(DTM dtm, int element)
dtm - The DTM Reference, must be non-null.element - The DTM element handle.public int getLength()
getLength in interface NamedNodeMappublic Node getNamedItem(String name)
getNamedItem in interface NamedNodeMappublic Node item(int i)
item in interface NamedNodeMappublic Node setNamedItem(Node newNode)
setNamedItem in interface NamedNodeMappublic Node removeNamedItem(String name)
removeNamedItem in interface NamedNodeMappublic Node getNamedItemNS(String namespaceURI, String localName)
getNamedItemNS in interface NamedNodeMappublic Node setNamedItemNS(Node arg) throws DOMException
setNamedItemNS in interface NamedNodeMapDOMExceptionpublic Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException
removeNamedItemNS in interface NamedNodeMapDOMExceptionCopyright © 2022–2023 HtmlUnit. All rights reserved.