net.sf.saxon.dom

## Class AttrOverNodeInfo

- java.lang.Object
- - net.sf.saxon.dom.NodeOverNodeInfo
  - - net.sf.saxon.dom.AttrOverNodeInfo

- All Implemented Interfaces:
    Attr, Node

      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.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.dom.NodeOverNodeInfo

      `node`

    - ### Fields inherited from interface org.w3c.dom.Node

      `ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AttrOverNodeInfo()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.

    - ### Methods inherited from class net.sf.saxon.dom.NodeOverNodeInfo

      `appendChild, cloneNode, compareDocumentPosition, disallowUpdate, equals, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUnderlyingNodeInfo, getUserData, hasAttributes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData, wrap`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.w3c.dom.Node

      `appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData`

- - ### Constructor Detail

    - #### AttrOverNodeInfo

          public AttrOverNodeInfo()

  - ### Method Detail

    - #### getName

          public String getName()

      Get the name of an attribute node (the lexical QName) (DOM method)
      Specified by:
        `getName` in interface `Attr`

    - #### getValue

          public String getValue()

      Return the character value of an attribute node (DOM method)
      Specified by:
        `getValue` in interface `Attr`
      Returns:
        the attribute value

    - #### hasChildNodes

          public boolean hasChildNodes()

      Determine whether the node has any children.
      Specified by:
        `hasChildNodes` in interface `Node`
      Overrides:
        `hasChildNodes` in class `NodeOverNodeInfo`
      Returns:
        `true`: a DOM Attribute has a text node as a child.

    - #### getFirstChild

          public Node getFirstChild()

      Get first child
      Specified by:
        `getFirstChild` in interface `Node`
      Overrides:
        `getFirstChild` in class `NodeOverNodeInfo`
      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
      Specified by:
        `getLastChild` in interface `Node`
      Overrides:
        `getLastChild` in class `NodeOverNodeInfo`
      Returns:
        last child of this node, or null if it has no children

    - #### 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.
      Specified by:
        `getChildNodes` in interface `Node`
      Overrides:
        `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 `Attr`
      Returns:
        Always true in this implementation.

    - #### setValue

          public void setValue(String value)
                        throws DOMException

      Set the value of an attribute node. (DOM method). Always fails (because tree is readonly)
      Specified by:
        `setValue` in interface `Attr`
      Throws:
        `DOMException`

    - #### 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 `Attr`

    - #### getOwnerElement

          public Element getOwnerElement()

      The `Element` node this attribute is attached to or `null` if this attribute is not in use.
      Specified by:
        `getOwnerElement` in interface `Attr`
      Since:
        DOM Level 2

    - #### getSchemaTypeInfo

          public TypeInfo getSchemaTypeInfo()

      Get the schema type information for this node. Returns null for an untyped node.
      Specified by:
        `getSchemaTypeInfo` in interface `Attr`

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.