Java Code Examples for com.sun.org.apache.xml.internal.dtm.DTMIterator#setRoot()
The following examples show how to use
com.sun.org.apache.xml.internal.dtm.DTMIterator#setRoot() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XPathContext.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 2
Source File: XPathContext.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 3
Source File: LocPathIterator.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 4
Source File: XPathContext.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 5
Source File: LocPathIterator.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 6
Source File: XPathContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 7
Source File: LocPathIterator.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 8
Source File: XPathContext.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 9
Source File: LocPathIterator.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 10
Source File: XPathContext.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 11
Source File: LocPathIterator.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 12
Source File: LocPathIterator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 13
Source File: LocPathIterator.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 14
Source File: XPathContext.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 15
Source File: LocPathIterator.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 16
Source File: XPathContext.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 17
Source File: LocPathIterator.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 18
Source File: XPathContext.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }
Example 19
Source File: LocPathIterator.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @return the first node out of the nodeset, or DTM.NULL. */ public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { DTMIterator iter = (DTMIterator)m_clones.getInstance(); int current = xctxt.getCurrentNode(); iter.setRoot(current, xctxt); int next = iter.nextNode(); // m_clones.freeInstance(iter); iter.detach(); return next; }
Example 20
Source File: XPathContext.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Create a new <code>DTMIterator</code> that holds exactly one node. * * @param node The node handle that the DTMIterator will iterate to. * * @return The newly created <code>DTMIterator</code>. */ public DTMIterator createDTMIterator(int node) { // DescendantIterator iter = new DescendantIterator(); DTMIterator iter = new com.sun.org.apache.xpath.internal.axes.OneStepIteratorForward(Axis.SELF); iter.setRoot(node, this); return iter; // return m_dtmManager.createDTMIterator(node); }