net.sf.saxon.dom
Class AttrOverNodeInfo
- Attr, Node
public class AttrOverNodeInfo
implements Attr
This class is an implementation of the DOM Attr class that wraps a Saxon NodeInfo
representation of an attribute or namespace node.
NodeList | getChildNodes() - Return a
NodeList that contains all children of this node.
|
Node | getFirstChild() - Get first child
|
Node | getLastChild() - Get last child
|
String | getName() - Get the name of an attribute node (the lexical QName) (DOM method)
|
Element | getOwnerElement() - The
Element node this attribute is attached to or
null if this attribute is not in use.
|
TypeInfo | getSchemaTypeInfo() - Get the schema type information for this node.
|
boolean | getSpecified() - If this attribute was explicitly given a value in the original
document, this is
true ; otherwise, it is
false .
|
String | getValue() - Return the character value of an attribute node (DOM method)
|
boolean | hasChildNodes() - Determine whether the node has any children.
|
boolean | isId() - Determine whether this (attribute) node is an ID.
|
void | setValue(String value) - Set the value of an attribute node.
|
appendChild , cloneNode , compareDocumentPosition , disallowUpdate , getAttributes , getBaseURI , getChildNodes , getFeature , getFirstChild , getLastChild , getLocalName , getNamespaceURI , getNextSibling , getNodeName , getNodeType , getNodeValue , getOwnerDocument , getParentNode , getPrefix , getPreviousSibling , getTextContent , getUnderlyingNodeInfo , getUserData , hasAttributes , hasChildNodes , insertBefore , isDefaultNamespace , isEqualNode , isSameNode , isSupported , lookupNamespaceURI , lookupPrefix , normalize , removeChild , replaceChild , setNodeValue , setPrefix , setTextContent , setUserData , wrap |
getChildNodes
public NodeList getChildNodes()
Return a NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.
- getChildNodes in interface NodeOverNodeInfo
getFirstChild
public Node getFirstChild()
Get first child
- getFirstChild in interface NodeOverNodeInfo
- the first child node of this node. In this model an attribute node always has a single text
node as its child.
getLastChild
public Node getLastChild()
Get last child
- getLastChild in interface NodeOverNodeInfo
- last child of this node, or null if it has no children
getName
public String getName()
Get the name of an attribute node (the lexical QName) (DOM method)
getOwnerElement
public Element getOwnerElement()
The Element
node this attribute is attached to or
null
if this attribute is not in use.
getSchemaTypeInfo
public TypeInfo getSchemaTypeInfo()
Get the schema type information for this node. Returns null for an untyped node.
getSpecified
public boolean getSpecified()
If this attribute was explicitly given a value in the original
document, this is true
; otherwise, it is
false
. (DOM method)
- Always true in this implementation.
getValue
public String getValue()
Return the character value of an attribute node (DOM method)
hasChildNodes
public boolean hasChildNodes()
Determine whether the node has any children.
- hasChildNodes in interface NodeOverNodeInfo
true
: a DOM Attribute has a text node as a child.
isId
public boolean isId()
Determine whether this (attribute) node is an ID. This method is introduced
in DOM Level 3.
setValue
public void setValue(String value)
throws DOMException
Set the value of an attribute node. (DOM method).
Always fails (because tree is readonly)