Class DocumentInfo

All Implemented Interfaces:
Iterable<NodeInfo>, Source, SourceLocator, Location, GroundedValue<NodeInfo>, Item<NodeInfo>, NodeInfo, Sequence<NodeInfo>, VirtualNode, Locator

public class DocumentInfo extends AbstractVirtualNode
The class DocumentInfo is retained in Saxon 9.7 to preserve a level of backwards compatibility for applications that use the method Configuration.buildDocument(Source) method to construct a tree. In earlier releases it was an interface implemented by all document nodes; from 9.7 it is a wrapper object around the NodeInfo object that represents the actual document node
  • Constructor Details

    • DocumentInfo

      public DocumentInfo(NodeInfo node)
  • Method Details

    • copy

      public void copy(Receiver out, int copyOptions, Location locationId) throws XPathException
      Description copied from interface: NodeInfo
      Copy this node to a given Receiver.

      This method is primarily for internal use. It should not be considered a stable part of the Saxon API.

      The default implementation invokes Navigator.copy(this, out, copyOptions, locationId); which is always adequate.

      Parameters:
      out - the Receiver to which the node should be copied. It is the caller's responsibility to ensure that this Receiver is open before the method is called (or that it is self-opening), and that it is closed after use.
      copyOptions - a selection of the options defined in CopyOptions
      locationId - If non-null, identifies the location of the instruction that requested this copy. If zero, indicates that the location information is not available
      Throws:
      XPathException - if any downstream error occurs
    • getParent

      public NodeInfo getParent()
      Description copied from interface: NodeInfo
      Get the NodeInfo object representing the parent of this node
      Returns:
      the parent of this node; null if this node has no parent
    • iterateAxis

      public AxisIterator iterateAxis(byte axisNumber)
      Description copied from interface: NodeInfo
      Return an iteration over all the nodes reached by the given axis from this node
      Parameters:
      axisNumber - an integer identifying the axis; one of the constants defined in class AxisInfo
      Returns:
      an AxisIterator that delivers the nodes reached by the axis in turn. The nodes are returned in axis order (document order for a forwards axis, reverse document order for a reverse axis). The default implementation returns iterateAxis(axisNumber, AnyNodeTest.getInstance().
      See Also: