Package net.sf.saxon.dom
Class DOMAttributeMap
- java.lang.Object
-
- net.sf.saxon.dom.DOMAttributeMap
-
- All Implemented Interfaces:
NamedNodeMap
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.
-
-
Constructor Summary
Constructors Constructor Description DOMAttributeMap(NodeInfo element)
Construct an AttributeMap for a given element node
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
Constructor Detail
-
DOMAttributeMap
public DOMAttributeMap(NodeInfo element)
Construct an AttributeMap for a given element node- Parameters:
element
- the element node owning the attributes
-
-
Method Detail
-
getNamedItem
public Node getNamedItem(String name)
Get named attribute (DOM NamedNodeMap method)- Specified by:
getNamedItem
in interfaceNamedNodeMap
-
item
public Node item(int index)
Get n'th attribute (DOM NamedNodeMap method). Numbering is from zero. In this implementation we number the attributes as follows: 0..p namespace declarations p+1..n "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
public Node getNamedItemNS(String uri, String localName)
Get named attribute (DOM NamedNodeMap method)- Specified by:
getNamedItemNS
in interfaceNamedNodeMap
-
setNamedItem
public Node setNamedItem(Node arg) throws DOMException
Set named attribute (DOM NamedNodeMap method: always fails)- Specified by:
setNamedItem
in interfaceNamedNodeMap
- Throws:
DOMException
- always, to indicate that update is not supported in this DOM implementation
-
removeNamedItem
public Node removeNamedItem(String name) throws DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)- Specified by:
removeNamedItem
in interfaceNamedNodeMap
- Throws:
DOMException
- always, to indicate that update is not supported in this DOM implementation
-
setNamedItemNS
public Node setNamedItemNS(Node arg) throws DOMException
Set named attribute (DOM NamedNodeMap method: always fails)- Specified by:
setNamedItemNS
in interfaceNamedNodeMap
- Throws:
DOMException
- always, to indicate that update is not supported in this DOM implementation
-
removeNamedItemNS
public Node removeNamedItemNS(String uri, String localName) throws DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)- Specified by:
removeNamedItemNS
in interfaceNamedNodeMap
- Throws:
DOMException
- always, to indicate that update is not supported in this DOM implementation
-
-