/** * Close the stream of Receiver events */ public void close() throws XPathException { // System.err.println("TreeBuilder: " + this + " End document"); if (currentNode == null) { return; // can be called twice on an error path } currentNode.compact(size[depth]); currentNode = null; // we're not going to use this Builder again so give the garbage collector // something to play with arrays = null; super.close(); nodeFactory = DefaultNodeFactory.THE_INSTANCE; }
/** * Callback interface for SAX: not for application use */ public void close () throws XPathException { // System.err.println("TreeBuilder: " + this + " End document"); if (currentNode==null) return; // can be called twice on an error path currentNode.compact(size[depth]); currentNode = null; // we're not going to use this Builder again so give the garbage collector // something to play with arrays = null; super.close(); nodeFactory = null; }
/** * Close the stream of Receiver events */ public void close () throws XPathException { // System.err.println("TreeBuilder: " + this + " End document"); if (currentNode==null) { return; // can be called twice on an error path } currentNode.compact(size[depth]); currentNode = null; // we're not going to use this Builder again so give the garbage collector // something to play with arrays = null; super.close(); nodeFactory = null; }
/** * Callback interface for SAX: not for application use */ public void close () throws XPathException { // System.err.println("TreeBuilder: " + this + " End document"); if (currentNode==null) return; // can be called twice on an error path currentNode.compact(size[depth]); currentNode = null; // we're not going to use this Builder again so give the garbage collector // something to play with arrays = null; super.close(); nodeFactory = null; }
/** * Close the stream of Receiver events */ public void close() throws XPathException { // System.err.println("TreeBuilder: " + this + " End document"); if (currentNode == null) { return; // can be called twice on an error path } currentNode.compact(size[depth]); currentNode = null; // we're not going to use this Builder again so give the garbage collector // something to play with arrays = null; super.close(); nodeFactory = DefaultNodeFactory.THE_INSTANCE; }
public void close() throws XPathException { TinyTree tt = tree; if (tt != null) { tt.addNode(Type.STOPPER, 0, 0, 0, -1); tt.condense(statistics); } super.close(); }
public void close() throws XPathException { //System.err.println("Tree.close " + tree + " size=" + tree.numberOfNodes); tree.addNode(Type.STOPPER, 0, 0, 0, -1); tree.condense(); super.close(); }
public void close() throws XPathException { //System.err.println("Tree.close " + tree + " size=" + tree.numberOfNodes); tree.addNode(Type.STOPPER, 0, 0, 0, -1); tree.condense(); super.close(); }
public void close() throws XPathException { //System.err.println("Tree.close " + tree + " size=" + tree.numberOfNodes); tree.addNode(Type.STOPPER, 0, 0, 0, -1); tree.condense(); super.close(); }
public void close() throws XPathException { TinyTree tt = tree; if (tt != null) { tt.addNode(Type.STOPPER, 0, 0, 0, -1); tt.condense(statistics); } super.close(); }
public XdmNode getDocumentNode() throws SaxonApiException { try { builder.close(); } catch (XPathException e) { throw new SaxonApiException(e); } return new XdmNode(builder.getCurrentRoot()); } }
public XdmNode getDocumentNode() throws SaxonApiException { try { builder.close(); } catch (XPathException e) { throw new SaxonApiException(e); } return new XdmNode(builder.getCurrentRoot()); } }
/** * Copy a DOM node to create a node in a different tree model * * @param node the DOM node to be copied * @param model the target tree model * @param config the Saxon Configuration * @return the copied node * @throws net.sf.saxon.trans.XPathException * if the operation fails * @since 9.2 */ public NodeInfo copy(Node node, TreeModel model, Configuration config) throws XPathException { PipelineConfiguration pipe = config.makePipelineConfiguration(); Builder builder = model.makeBuilder(pipe); builder.open(); Sender.send(new DOMSource(node), builder, null); NodeInfo result = builder.getCurrentRoot(); builder.close(); return result; }
/** * Copy a DOM node to create a node in a different tree model * * @param node the DOM node to be copied * @param model the target tree model * @param config the Saxon Configuration * @return the copied node * @throws net.sf.saxon.trans.XPathException * if the operation fails * @since 9.2 */ public NodeInfo copy(Node node, TreeModel model, Configuration config) throws XPathException { PipelineConfiguration pipe = config.makePipelineConfiguration(); Builder builder = model.makeBuilder(pipe); builder.open(); Sender.send(new DOMSource(node), builder, null); NodeInfo result = builder.getCurrentRoot(); builder.close(); return result; }
builder.close(); NodeInfo doc = builder.getCurrentRoot();
builder.close(); NodeInfo doc = builder.getCurrentRoot(); AxisIterator elms = doc.iterateAxis(
builder.open(); stylesheetNode.copy(filter, 0, ExplicitLocation.UNKNOWN_LOCATION); builder.close(); stylesheetNode = builder.getCurrentRoot();