net.sf.saxon.dom
Class DOMAttributeMap
class
DOMAttributeMap
extends Object
implements NamedNodeMap
Implementation of DOM NamedNodeMap used to represent the attributes of an element, for use when
Saxon element and attribute nodes are accessed using the DOM API.
Note that namespaces are treated as attributes.
Method Summary |
int | getLength()
Get number of attributes and namespaces (DOM NamedNodeMap method). |
Node | getNamedItem(String name)
Get named attribute (DOM NamedNodeMap method) |
Node | getNamedItemNS(String uri, String localName)
Get named attribute (DOM NamedNodeMap method) |
Node | item(int index)
Get n'th attribute (DOM NamedNodeMap method).
|
Node | removeNamedItem(String name)
Remove named attribute (DOM NamedNodeMap method: always fails) |
Node | removeNamedItemNS(String uri, String localName)
Remove named attribute (DOM NamedNodeMap method: always fails) |
Node | setNamedItem(Node arg)
Set named attribute (DOM NamedNodeMap method: always fails) |
Node | setNamedItemNS(Node arg)
Set named attribute (DOM NamedNodeMap method: always fails) |
Construct an AttributeMap for a given element node
public int getLength()
Get number of attributes and namespaces (DOM NamedNodeMap method).
public Node getNamedItem(String name)
Get named attribute (DOM NamedNodeMap method)
public Node getNamedItemNS(String uri, String localName)
Get named attribute (DOM NamedNodeMap method)
public Node item(int index)
Get n'th attribute (DOM NamedNodeMap method).
In this implementation we number the attributes as follows:
0 - the xmlns:xml namespace declaration
1-n further namespace declarations
n+1... "real" attribute declarations
public Node removeNamedItem(String name)
Remove named attribute (DOM NamedNodeMap method: always fails)
public Node removeNamedItemNS(String uri, String localName)
Remove named attribute (DOM NamedNodeMap method: always fails)
public Node setNamedItem(Node arg)
Set named attribute (DOM NamedNodeMap method: always fails)
public Node setNamedItemNS(Node arg)
Set named attribute (DOM NamedNodeMap method: always fails)