public abstract class NodeOverNodeInfo extends Object implements Node
The class provides read-only access to the tree; methods that request updates all fail with an UnsupportedOperationException.
| Modifier and Type | Field and Description | 
|---|---|
| protected NodeInfo | 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 and Description | 
|---|
| NodeOverNodeInfo() | 
| Modifier and Type | Method and Description | 
|---|---|
| Node | appendChild(Node newChild)Adds the node  newChildto the end of the list of children
 of this node. | 
| Node | cloneNode(boolean deep)Returns a duplicate of this node, i.e., serves as a generic copy
 constructor for nodes. | 
| short | compareDocumentPosition(Node other)Compare the position of the (other) node in document order with the reference node (this node). | 
| protected static void | disallowUpdate()Internal method used to indicate that update operations are not allowed | 
| boolean | equals(Object obj)The equals() method returns true for two Node objects that represent the same
 conceptual DOM Node. | 
| NamedNodeMap | getAttributes()Return a  NamedNodeMapcontaining the attributes of this node (if
 it is anElement) ornullotherwise. | 
| String | getBaseURI()Get the base URI for the node. | 
| NodeList | getChildNodes()Return a  NodeListthat contains all children of this node. | 
| Object | getFeature(String feature,
          String version)Get a feature of this node. | 
| Node | getFirstChild()Get first child | 
| Node | getLastChild()Get last child | 
| String | getLocalName()Get the local name of this node, following the DOM rules | 
| String | getNamespaceURI()The namespace URI of this node, or  nullif it is
 unspecified. | 
| Node | getNextSibling()Get next sibling node | 
| String | getNodeName()Get the name of this node, following the DOM rules | 
| short | getNodeType()Get the type of this node (node kind, in XPath terminology). | 
| String | getNodeValue()Get the node value (as defined in the DOM). | 
| Document | getOwnerDocument()Return the  Documentobject associated with this node. | 
| Node | getParentNode()Find the parent node of this node. | 
| String | getPrefix()The namespace prefix of this node, or  nullif it is
 unspecified. | 
| Node | getPreviousSibling()Get the previous sibling of the node | 
| String | getTextContent()Get the text content of a node. | 
| NodeInfo | getUnderlyingNodeInfo()Get the Saxon NodeInfo object representing this node | 
| Object | getUserData(String key)Get user data associated with this node. | 
| boolean | hasAttributes()Returns whether this node has any attributes. | 
| boolean | hasChildNodes()Determine whether the node has any children. | 
| int | hashCode()Return a hashCode | 
| Node | insertBefore(Node newChild,
            Node refChild)Insert the node  newChildbefore the existing child noderefChild. | 
| boolean | isDefaultNamespace(String namespaceURI)Test whether a particular namespace is the default namespace. | 
| boolean | isEqualNode(Node arg)Compare whether two nodes have the same content. | 
| boolean | isSameNode(Node other)Determine whether this is the same node as another node. | 
| boolean | isSupported(String feature,
           String version)Tests whether the DOM implementation implements a specific feature and
 that feature is supported by this node. | 
| String | lookupNamespaceURI(String prefix)Find the URI corresponding to a given in-scope prefix | 
| String | lookupPrefix(String namespaceURI)Get the (first) prefix assigned to a specified namespace URI, or null
 if the namespace is not in scope. | 
| void | normalize()Puts all  Textnodes in the full depth of the sub-tree
 underneath thisNode, including attribute nodes, into a
 "normal" form where only structure (e.g., elements, comments,
 processing instructions, CDATA sections, and entity references)
 separatesTextnodes, i.e., there are neither adjacentTextnodes nor emptyTextnodes. | 
| Node | removeChild(Node oldChild)Remove the child node indicated by  oldChildfrom the
 list of children, and returns it. | 
| Node | replaceChild(Node newChild,
            Node oldChild)Replace the child node  oldChildwithnewChildin the list of children, and returns theoldChildnode. | 
| void | setNodeValue(String nodeValue)Set the node value. | 
| void | setPrefix(String prefix)Set the namespace prefix of this node. | 
| void | setTextContent(String textContent)Set the text content of a node. | 
| Object | setUserData(String key,
           Object data,
           UserDataHandler handler)Set user data. | 
| static NodeOverNodeInfo | wrap(NodeInfo node)Factory method to construct a DOM node that wraps an underlying Saxon NodeInfo | 
protected NodeInfo node
public NodeInfo getUnderlyingNodeInfo()
public static NodeOverNodeInfo wrap(NodeInfo node)
node - the Saxon NodeInfo objectpublic final boolean isSameNode(Node other)
isSameNode in interface Nodepublic boolean equals(Object obj)
public int hashCode()
public String getBaseURI()
getBaseURI in interface Nodepublic String getNodeName()
getNodeName in interface Nodepublic String getLocalName()
getLocalName in interface Nodepublic boolean hasChildNodes()
hasChildNodes in interface Nodetrue if this node has any attributes,
   false otherwise.public boolean hasAttributes()
hasAttributes in interface Nodetrue if this node has any attributes,
   false otherwise.public short getNodeType()
Type) are the same as those assigned in the DOMgetNodeType in interface Nodepublic Node getParentNode()
getParentNode in interface Nodepublic Node getPreviousSibling()
getPreviousSibling in interface Nodepublic Node getNextSibling()
getNextSibling in interface Nodepublic Node getFirstChild()
getFirstChild in interface Nodepublic Node getLastChild()
getLastChild in interface Nodepublic String getNodeValue()
getNodeValue in interface Nodepublic void setNodeValue(String nodeValue) throws DOMException
setNodeValue in interface NodeDOMExceptionpublic NodeList getChildNodes()
NodeList that contains all children of this node. If
 there are no children, this is a NodeList containing no
 nodes.getChildNodes in interface Nodepublic NamedNodeMap getAttributes()
NamedNodeMap containing the attributes of this node (if
 it is an Element) or null otherwise. Note that this
 implementation changed in Saxon 8.8 to treat namespace declarations as attributes.getAttributes in interface Nodepublic Document getOwnerDocument()
Document object associated with this node.getOwnerDocument in interface Nodepublic Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild before the existing child node
 refChild. Always fails.insertBefore in interface NodenewChild - The node to insert.refChild - The reference node, i.e., the node before which the
   new node must be inserted.DOMException - NO_MODIFICATION_ALLOWED_ERR: Always raised.public Node replaceChild(Node newChild, Node oldChild) throws DOMException
oldChild with
 newChild in the list of children, and returns the
 oldChild node. Always fails.replaceChild in interface NodenewChild - The new node to put in the child list.oldChild - The node being replaced in the list.DOMException - NO_MODIFICATION_ALLOWED_ERR: Always raised.public Node removeChild(Node oldChild) throws DOMException
oldChild from the
 list of children, and returns it. Always fails.removeChild in interface NodeoldChild - The node being removed.DOMException - NO_MODIFICATION_ALLOWED_ERR: Always raised.public Node appendChild(Node newChild) throws DOMException
newChild to the end of the list of children
 of this node. Always fails.appendChild in interface NodenewChild - The node to add.DOMException - public Node cloneNode(boolean deep)
public void normalize()
Text nodes in the full depth of the sub-tree
 underneath this Node, including attribute nodes, into a
 "normal" form where only structure (e.g., elements, comments,
 processing instructions, CDATA sections, and entity references)
 separates Text nodes, i.e., there are neither adjacent
 Text nodes nor empty Text nodes.public boolean isSupported(String feature, String version)
isSupported in interface Nodefeature - The name of the feature to test. This is the same name
   which can be passed to the method hasFeature on
   DOMImplementation .version - This is the version number of the feature to test. In
   Level 2, version 1, this is the string "2.0". If the version is not
   specified, supporting any version of the feature will cause the
   method to return true .true if the specified feature is supported
    on this node, false otherwise.public String getNamespaceURI()
null if it is
 unspecified.
 ELEMENT_NODE and
 ATTRIBUTE_NODE and nodes created with a DOM Level 1
 method, such as createElement from the
 Document interface, this is always null .
 Per the  Namespaces in XML Specification  an attribute does not
 inherit its namespace from the element it is attached to. If an
 attribute is not explicitly given a namespace, it simply has no
 namespace.getNamespaceURI in interface Nodepublic String getPrefix()
null if it is
 unspecified.
 ELEMENT_NODE and
 ATTRIBUTE_NODE and nodes created with a DOM Level 1
 method, such as createElement from the
 Document interface, this is always null.public void setPrefix(String prefix) throws DOMException
setPrefix in interface NodeDOMExceptionpublic short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition in interface Nodeother - the other node.DOMExceptionpublic String getTextContent() throws DOMException
getTextContent in interface NodeDOMExceptionpublic void setTextContent(String textContent) throws DOMException
setTextContent in interface NodetextContent - the new text content of the nodeDOMExceptionpublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface NodenamespaceURI - the namespace whose prefix is requiredpublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface NodenamespaceURI - the namespace to be testedpublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface Nodeprefix - The namespace prefix whose namespace URI is required.public boolean isEqualNode(Node arg)
isEqualNode in interface Nodearg - The node to be compared. This must wrap a Saxon NodeInfo.public Object getFeature(String feature, String version)
getFeature in interface Nodefeature - the required featureversion - the version of the required featurepublic Object setUserData(String key, Object data, UserDataHandler handler)
setUserData in interface Nodekey - name of the user datadata - value of the user datahandler - handler for the user datapublic Object getUserData(String key)
getUserData in interface Nodekey - identifies the user data requiredprotected static void disallowUpdate()
                              throws DOMException
DOMException - always, to indicate that update is not supported in this DOM implementationCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.