Class AttrOverNodeInfo

  • All Implemented Interfaces:
    org.w3c.dom.Attr, org.w3c.dom.Node

    public class AttrOverNodeInfo
    extends NodeOverNodeInfo
    implements org.w3c.dom.Attr
    This class is an implementation of the DOM Attr class that wraps a Saxon NodeInfo representation of an attribute or namespace node.
    • Constructor Detail

      • AttrOverNodeInfo

        public AttrOverNodeInfo()
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of an attribute node (the lexical QName) (DOM method)
        Specified by:
        getName in interface org.w3c.dom.Attr
      • getValue

        public java.lang.String getValue()
        Return the character value of an attribute node (DOM method)
        Specified by:
        getValue in interface org.w3c.dom.Attr
        the attribute value
      • hasChildNodes

        public boolean hasChildNodes()
        Determine whether the node has any children.
        Specified by:
        hasChildNodes in interface org.w3c.dom.Node
        hasChildNodes in class NodeOverNodeInfo
        true: a DOM Attribute has a text node as a child.
      • getFirstChild

        public org.w3c.dom.Node getFirstChild()
        Get first child
        Specified by:
        getFirstChild in interface org.w3c.dom.Node
        getFirstChild in class 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 org.w3c.dom.Node getLastChild()
        Get last child
        Specified by:
        getLastChild in interface org.w3c.dom.Node
        getLastChild in class NodeOverNodeInfo
        last child of this node, or null if it has no children
      • getChildNodes

        public org.w3c.dom.NodeList getChildNodes()
        Return a NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes.
        Specified by:
        getChildNodes in interface org.w3c.dom.Node
        getChildNodes in class NodeOverNodeInfo
      • 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)
        Specified by:
        getSpecified in interface org.w3c.dom.Attr
        Always true in this implementation.
      • setValue

        public void setValue​(java.lang.String value)
                      throws org.w3c.dom.DOMException
        Set the value of an attribute node. (DOM method). Always fails (because tree is readonly)
        Specified by:
        setValue in interface org.w3c.dom.Attr
        org.w3c.dom.DOMException - always, to indicate that update is not supported in this DOM implementation
      • isId

        public boolean isId()
        Determine whether this (attribute) node is an ID. This method is introduced in DOM Level 3.
        Specified by:
        isId in interface org.w3c.dom.Attr
      • getOwnerElement

        public org.w3c.dom.Element getOwnerElement()
        The Element node this attribute is attached to or null if this attribute is not in use.
        Specified by:
        getOwnerElement in interface org.w3c.dom.Attr
        DOM Level 2
      • getSchemaTypeInfo

        public org.w3c.dom.TypeInfo getSchemaTypeInfo()
        Get the schema type information for this node. Returns null for an untyped node.
        Specified by:
        getSchemaTypeInfo in interface org.w3c.dom.Attr