net.sf.saxon.dom

Class AttrOverNodeInfo

public class AttrOverNodeInfo extends NodeOverNodeInfo implements Attr

This class is an implementation of the DOM Attr class that wraps a Saxon NodeInfo representation of an attribute or namespace node.
Method Summary
NodeListgetChildNodes()
Return a NodeList that contains all children of this node.
NodegetFirstChild()
Get first child
NodegetLastChild()
Get last child
StringgetName()
Get the name of an attribute node (the lexical QName) (DOM method)
ElementgetOwnerElement()
The Element node this attribute is attached to or null if this attribute is not in use.
TypeInfogetSchemaTypeInfo()
Get the schema type information for this node.
booleangetSpecified()
If this attribute was explicitly given a value in the original document, this is true ; otherwise, it is false.
StringgetValue()
Return the character value of an attribute node (DOM method)
booleanhasChildNodes()
Determine whether the node has any children.
booleanisId()
Determine whether this (attribute) node is an ID.
voidsetValue(String value)
Set the value of an attribute node.

Method Detail

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.

getFirstChild

public Node getFirstChild()
Get first child

Returns: 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

Returns: 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.

Since: DOM Level 2

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)

Returns: Always true in this implementation.

getValue

public String getValue()
Return the character value of an attribute node (DOM method)

Returns: the attribute value

hasChildNodes

public boolean hasChildNodes()
Determine whether the node has any children.

Returns: 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)
Set the value of an attribute node. (DOM method). Always fails (because tree is readonly)