Package net.sf.saxon.tree.wrapper

## Interface VirtualNode

- All Superinterfaces:
    `GroundedValue`, `Item`, `Location`, `org.xml.sax.Locator`, `NodeInfo`, `Sequence`, `javax.xml.transform.Source`, `javax.xml.transform.SourceLocator`
  All Known Implementing Classes:
    `AbstractNodeWrapper`, `AbstractVirtualNode`, `AxiomAttributeWrapper`, `AxiomDocumentNodeWrapper`, `AxiomElementNodeWrapper`, `AxiomLeafNodeWrapper`, `AxiomParentNodeWrapper`, `DOM4JNodeWrapper`, `DominoNode`, `DOMNodeWrapper`, `JDOM2NodeWrapper`, `RebasedNode`, `SpaceStrippedNode`, `TypeStrippedNode`, `XOMDocumentWrapper`, `XOMNodeWrapper`

      public interface VirtualNode
      extends NodeInfo

  This interface is implemented by NodeInfo implementations that act as wrappers on some underlying tree. It provides a method to access the real node underlying the virtual node, for use by applications that need to drill down to the underlying data.

- - ### Field Summary

    - ### Fields inherited from interface net.sf.saxon.om.NodeInfo

      `IS_DTD_TYPE, IS_NILLED`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `getRealNode()` | Get the node underlying this virtual node.
    `java.lang.Object` | `getUnderlyingNode()` | Get the node underlying this virtual node.

    - ### Methods inherited from interface net.sf.saxon.om.GroundedValue

      `asIterable, concatenate, containsNode, effectiveBooleanValue, materialize`

    - ### Methods inherited from interface net.sf.saxon.om.Item

      `getLength, getStringValueCS, head, itemAt, iterate, reduce, subsequence`

    - ### Methods inherited from interface net.sf.saxon.s9api.Location

      `saveLocation`

    - ### Methods inherited from interface net.sf.saxon.om.NodeInfo

      `atomize, attributes, children, children, compareOrder, copy, equals, generateId, getAllNamespaces, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getFingerprint, getGenre, getLineNumber, getLocalPart, getNodeKind, getParent, getPrefix, getPublicId, getRoot, getSchemaType, getStringValue, getSystemId, getTreeInfo, getURI, hasChildNodes, hasFingerprint, hashCode, isId, isIdref, isNilled, isSameNodeInfo, isStreamed, iterateAxis, iterateAxis, toShortString`

    - ### Methods inherited from interface net.sf.saxon.om.Sequence

      `makeRepeatable`

    - ### Methods inherited from interface javax.xml.transform.Source

      `isEmpty, setSystemId`

- - ### Method Detail

    - #### getUnderlyingNode

          java.lang.Object getUnderlyingNode()

      Get the node underlying this virtual node. Note that this may itself be a VirtualNode; you may have to drill down through several layers of wrapping.

      In some cases a single VirtualNode may represent an XPath text node that maps to a sequence of adjacent nodes (for example text nodes and CDATA nodes) in the underlying tree. In this case the first node in this sequence is returned.

      Returns:
        The underlying node.

    - #### getRealNode

          java.lang.Object getRealNode()

      Get the node underlying this virtual node. If this is a VirtualNode the method will automatically drill down through several layers of wrapping.

      In some cases a single VirtualNode may represent an XPath text node that maps to a sequence of adjacent nodes (for example text nodes and CDATA nodes) in the underlying tree. In this case the first node in this sequence is returned.

      Returns:
        The underlying node.