Class TreeBuilder

    • Constructor Detail

      • TreeBuilder

        public TreeBuilder()
        create a Builder and initialise variables
    • Method Detail

      • setNodeFactory

        public void setNodeFactory​(NodeFactory factory)
        Set the Node Factory to use. If none is specified, the Builder uses its own.
      • setDocumentLocator

        public void setDocumentLocator​(Locator locator)
        Callback interface for SAX: not for application use
        Overrides:
        setDocumentLocator in class Emitter
      • startElement

        public void startElement​(int nameCode,
                                 Attributes attributes,
                                 int[] namespaces,
                                 int namespacesUsed)
                          throws TransformerException
        Callback interface for SAX: not for application use
        Specified by:
        startElement in class Emitter
        namespaces - Array of namespace codes identifying the namespace prefix/uri pairs associated with this element
        namespacesUsed - Number of significant entries within namespaces array
        Throws:
        TransformerException
      • processingInstruction

        public void processingInstruction​(String name,
                                          String remainder)
        Callback interface for SAX: not for application use
        Note: because SAX1 does not deliver comment nodes, we get these in the form of a processing instruction with a null name. This requires a specially-adapted SAX driver.
        Specified by:
        processingInstruction in class Emitter
      • graftElement

        public void graftElement​(ElementImpl element)
                          throws TransformerException
        graftElement() allows an element node to be transferred from one tree to another. This is a dangerous internal interface which is used only to contruct a stylesheet tree from a stylesheet using the "literal result element as stylesheet" syntax. The supplied element is grafted onto the current element as its only child.
        Throws:
        TransformerException