Interface BuildingContentHandler

  • All Superinterfaces:
    org.xml.sax.ContentHandler

    public interface BuildingContentHandler
    extends org.xml.sax.ContentHandler
    A SAX ContentHandler that builds a Saxon tree, and allows the node at the root of the tree to be retrieved on completion.

    To create a BuildingContentHandler for a particular tree model, use the method DocumentBuilder.newBuildingContentHandler().

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      XdmNode getDocumentNode()
      After building the document by writing a sequence of events, retrieve the root node of the constructed document tree
      • Methods inherited from interface org.xml.sax.ContentHandler

        characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
    • Method Detail

      • getDocumentNode

        XdmNode getDocumentNode()
                         throws SaxonApiException
        After building the document by writing a sequence of events, retrieve the root node of the constructed document tree
        Returns:
        the root node of the constructed tree. The result is undefined (maybe null, maybe an exception) if the method is called before successfully completing the sequence of events (of which the last should be ContentHandler.endDocument()) that constructs the tree.
        Throws:
        SaxonApiException - if any failure occurs