Package net.sf.saxon.dom
Class DOMAttributeMap
java.lang.Object
net.sf.saxon.dom.DOMAttributeMap
- All Implemented Interfaces:
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.
-
Constructor Summary
ConstructorsConstructorDescriptionDOMAttributeMap
(NodeInfo parent) Construct an AttributeMap for a given element node -
Method Summary
Modifier and TypeMethodDescriptionint
Get number of attributes and namespaces (DOM NamedNodeMap method).getNamedItem
(String name) Get named attribute (DOM NamedNodeMap method)getNamedItemNS
(String uri, String localName) Get named attribute (DOM NamedNodeMap method)item
(int index) Get n'th attribute (DOM NamedNodeMap method).removeNamedItem
(String name) Remove named attribute (DOM NamedNodeMap method: always fails)removeNamedItemNS
(String uri, String localName) Remove named attribute (DOM NamedNodeMap method: always fails)setNamedItem
(Node arg) Set named attribute (DOM NamedNodeMap method: always fails)setNamedItemNS
(Node arg) Set named attribute (DOM NamedNodeMap method: always fails)
-
Constructor Details
-
DOMAttributeMap
Construct an AttributeMap for a given element node
-
-
Method Details
-
getNamedItem
Get named attribute (DOM NamedNodeMap method)- Specified by:
getNamedItem
in interfaceNamedNodeMap
-
item
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- Specified by:
item
in interfaceNamedNodeMap
-
getLength
public int getLength()Get number of attributes and namespaces (DOM NamedNodeMap method).- Specified by:
getLength
in interfaceNamedNodeMap
-
getNamedItemNS
Get named attribute (DOM NamedNodeMap method)- Specified by:
getNamedItemNS
in interfaceNamedNodeMap
-
setNamedItem
Set named attribute (DOM NamedNodeMap method: always fails)- Specified by:
setNamedItem
in interfaceNamedNodeMap
- Throws:
DOMException
-
removeNamedItem
Remove named attribute (DOM NamedNodeMap method: always fails)- Specified by:
removeNamedItem
in interfaceNamedNodeMap
- Throws:
DOMException
-
setNamedItemNS
Set named attribute (DOM NamedNodeMap method: always fails)- Specified by:
setNamedItemNS
in interfaceNamedNodeMap
- Throws:
DOMException
-
removeNamedItemNS
Remove named attribute (DOM NamedNodeMap method: always fails)- Specified by:
removeNamedItemNS
in interfaceNamedNodeMap
- Throws:
DOMException
-