Package net.sf.saxon.dom
Class DOMAttributeMap
- java.lang.Object
-
- net.sf.saxon.dom.DOMAttributeMap
-
- All Implemented Interfaces:
org.w3c.dom.NamedNodeMap
class DOMAttributeMap extends java.lang.Object implements org.w3c.dom.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).org.w3c.dom.Node
getNamedItem(java.lang.String name)
Get named attribute (DOM NamedNodeMap method)org.w3c.dom.Node
getNamedItemNS(java.lang.String uri, java.lang.String localName)
Get named attribute (DOM NamedNodeMap method)org.w3c.dom.Node
item(int index)
Get n'th attribute (DOM NamedNodeMap method).org.w3c.dom.Node
removeNamedItem(java.lang.String name)
Remove named attribute (DOM NamedNodeMap method: always fails)org.w3c.dom.Node
removeNamedItemNS(java.lang.String uri, java.lang.String localName)
Remove named attribute (DOM NamedNodeMap method: always fails)org.w3c.dom.Node
setNamedItem(org.w3c.dom.Node arg)
Set named attribute (DOM NamedNodeMap method: always fails)org.w3c.dom.Node
setNamedItemNS(org.w3c.dom.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 org.w3c.dom.Node getNamedItem(java.lang.String name)
Get named attribute (DOM NamedNodeMap method)- Specified by:
getNamedItem
in interfaceorg.w3c.dom.NamedNodeMap
-
item
public org.w3c.dom.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 interfaceorg.w3c.dom.NamedNodeMap
-
getLength
public int getLength()
Get number of attributes and namespaces (DOM NamedNodeMap method).- Specified by:
getLength
in interfaceorg.w3c.dom.NamedNodeMap
-
getNamedItemNS
public org.w3c.dom.Node getNamedItemNS(java.lang.String uri, java.lang.String localName)
Get named attribute (DOM NamedNodeMap method)- Specified by:
getNamedItemNS
in interfaceorg.w3c.dom.NamedNodeMap
-
setNamedItem
public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node arg) throws org.w3c.dom.DOMException
Set named attribute (DOM NamedNodeMap method: always fails)- Specified by:
setNamedItem
in interfaceorg.w3c.dom.NamedNodeMap
- Throws:
org.w3c.dom.DOMException
- always, to indicate that update is not supported in this DOM implementation
-
removeNamedItem
public org.w3c.dom.Node removeNamedItem(java.lang.String name) throws org.w3c.dom.DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)- Specified by:
removeNamedItem
in interfaceorg.w3c.dom.NamedNodeMap
- Throws:
org.w3c.dom.DOMException
- always, to indicate that update is not supported in this DOM implementation
-
setNamedItemNS
public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node arg) throws org.w3c.dom.DOMException
Set named attribute (DOM NamedNodeMap method: always fails)- Specified by:
setNamedItemNS
in interfaceorg.w3c.dom.NamedNodeMap
- Throws:
org.w3c.dom.DOMException
- always, to indicate that update is not supported in this DOM implementation
-
removeNamedItemNS
public org.w3c.dom.Node removeNamedItemNS(java.lang.String uri, java.lang.String localName) throws org.w3c.dom.DOMException
Remove named attribute (DOM NamedNodeMap method: always fails)- Specified by:
removeNamedItemNS
in interfaceorg.w3c.dom.NamedNodeMap
- Throws:
org.w3c.dom.DOMException
- always, to indicate that update is not supported in this DOM implementation
-
-