org.apache.xpath.objects.XObject.iter()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中org.apache.xpath.objects.XObject.iter()方法的一些代码示例,展示了XObject.iter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XObject.iter()方法的具体详情如下:
包路径:org.apache.xpath.objects.XObject
类名称:XObject
方法名:iter

XObject.iter介绍

[英]Cast result object to a nodelist. Always issues an error.
[中]将结果对象强制转换为节点列表。总是发出错误。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Return the first node out of the nodeset, if this expression is
 * a nodeset expression.
 * @param xctxt The XPath runtime context.
 * @return the first node out of the nodeset, or DTM.NULL.
 *
 * @throws javax.xml.transform.TransformerException
 */
public int asNode(XPathContext xctxt)
    throws javax.xml.transform.TransformerException
{
  DTMIterator iter = execute(xctxt).iter();
 return iter.nextNode();
}

代码示例来源:origin: xalan/xalan

/**
 * Return the first node out of the nodeset, if this expression is
 * a nodeset expression.
 * @param xctxt The XPath runtime context.
 * @return the first node out of the nodeset, or DTM.NULL.
 *
 * @throws javax.xml.transform.TransformerException
 */
public int asNode(XPathContext xctxt)
    throws javax.xml.transform.TransformerException
{
  DTMIterator iter = execute(xctxt).iter();
 return iter.nextNode();
}

代码示例来源:origin: robovm/robovm

/**
 * Given an select expression and a context, evaluate the XPath
 * and return the resulting iterator.
 *
 * @param xctxt The execution context.
 * @param contextNode The node that "." expresses.
 *
 *
 * @return A valid DTMIterator.
 * @throws TransformerException thrown if the active ProblemListener decides
 * the error condition is severe enough to halt processing.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage experimental
 */
public DTMIterator asIterator(XPathContext xctxt, int contextNode)
    throws javax.xml.transform.TransformerException
{
 try
 {
  xctxt.pushCurrentNodeAndExpression(contextNode, contextNode);
  return execute(xctxt).iter();
 }
 finally
 {
  xctxt.popCurrentNodeAndExpression();
 }
}

代码示例来源:origin: robovm/robovm

break;
case CLASS_NODESET :
 result = iter();
 break;
case CLASS_BOOLEAN :

代码示例来源:origin: xalan/xalan

/**
 * Given an select expression and a context, evaluate the XPath
 * and return the resulting iterator.
 *
 * @param xctxt The execution context.
 * @param contextNode The node that "." expresses.
 *
 *
 * @return A valid DTMIterator.
 * @throws TransformerException thrown if the active ProblemListener decides
 * the error condition is severe enough to halt processing.
 *
 * @throws javax.xml.transform.TransformerException
 * @xsl.usage experimental
 */
public DTMIterator asIterator(XPathContext xctxt, int contextNode)
    throws javax.xml.transform.TransformerException
{
 try
 {
  xctxt.pushCurrentNodeAndExpression(contextNode, contextNode);
  return execute(xctxt).iter();
 }
 finally
 {
  xctxt.popCurrentNodeAndExpression();
 }
}

代码示例来源:origin: xalan/xalan

break;
case CLASS_NODESET :
 result = iter();
 break;
case CLASS_BOOLEAN :

代码示例来源:origin: xalan/xalan

m_pw.println();
org.apache.xml.dtm.DTMIterator nl = ev.m_selection.iter();

代码示例来源:origin: robovm/robovm

DTMIterator nl = value.iter();

代码示例来源:origin: xalan/xalan

DTMIterator ni = xobj.iter();
int handle = ni.nextNode();
if (handle != DTM.NULL)
DTMIterator iter = xobj.iter();
int childHandle = iter.nextNode();
DTM dtm = iter.getDTM(childHandle);

代码示例来源:origin: xalan/xalan

DTMIterator nl = value.iter();

代码示例来源:origin: robovm/robovm

int baseNode = arg2.iter().nextNode();
  arg2.iter();
NodeSetDTM mnl = nodes.mutableNodeset();
DTMIterator iterator = (XObject.CLASS_NODESET == arg.getType())
            ? arg.iter() : null;
int pos = DTM.NULL;

代码示例来源:origin: robovm/robovm

DTMIterator ni = arg.iter();
int pos;
UnionPathIterator upi = new UnionPathIterator();

代码示例来源:origin: xalan/xalan

int baseNode = arg2.iter().nextNode();
  arg2.iter();
NodeSetDTM mnl = nodes.mutableNodeset();
DTMIterator iterator = (XObject.CLASS_NODESET == arg.getType())
            ? arg.iter() : null;
int pos = DTM.NULL;

代码示例来源:origin: robovm/robovm

DTMIterator ni = arg.iter();
StringVector usedrefs = null;
int pos = ni.nextNode();

代码示例来源:origin: xalan/xalan

DTMIterator ni = arg.iter();
int pos;
UnionPathIterator upi = new UnionPathIterator();

代码示例来源:origin: xalan/xalan

DTMIterator nl = value.iter();

代码示例来源:origin: xalan/xalan

DTMIterator ni = arg.iter();
StringVector usedrefs = null;
int pos = ni.nextNode();

代码示例来源:origin: MobiVM/robovm

/**
 * Return the first node out of the nodeset, if this expression is
 * a nodeset expression.
 * @param xctxt The XPath runtime context.
 * @return the first node out of the nodeset, or DTM.NULL.
 *
 * @throws javax.xml.transform.TransformerException
 */
public int asNode(XPathContext xctxt)
    throws javax.xml.transform.TransformerException
{
  DTMIterator iter = execute(xctxt).iter();
 return iter.nextNode();
}

代码示例来源:origin: org.apache.taglibs/taglibs-standard-impl

@Override
protected void prepare() throws JspTagException {
  context = XalanUtil.getContext(this, pageContext);
  try {
    XObject nodes = select.execute(context, context.getCurrentNode(), null);
    // create an iterator over the returned nodes and push into the context
    DTMIterator iterator = nodes.iter();
    context.pushContextNodeList(iterator);
  } catch (TransformerException e) {
    throw new JspTagException(e);
  }
}

代码示例来源:origin: org.jboss.spec.javax.servlet.jstl/jboss-jstl-api_1.2_spec

@Override
protected void prepare() throws JspTagException {
  context = XalanUtil.getContext(this, pageContext);
  try {
    XObject nodes = select.execute(context, context.getCurrentNode(), null);
    // create an iterator over the returned nodes and push into the context
    DTMIterator iterator = nodes.iter();
    context.pushContextNodeList(iterator);
  } catch (TransformerException e) {
    throw new JspTagException(e);
  }
}

相关文章