当前位置: 首页>>代码示例>>Java>>正文


Java NodeSetDTM类代码示例

本文整理汇总了Java中com.sun.org.apache.xpath.internal.NodeSetDTM的典型用法代码示例。如果您正苦于以下问题:Java NodeSetDTM类的具体用法?Java NodeSetDTM怎么用?Java NodeSetDTM使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NodeSetDTM类属于com.sun.org.apache.xpath.internal包,在下文中一共展示了NodeSetDTM类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: XNodeSetForDOM

import com.sun.org.apache.xpath.internal.NodeSetDTM; //导入依赖的package包/类
public XNodeSetForDOM(Node node, DTMManager dtmMgr)
{
  m_dtmMgr = dtmMgr;
  m_origObj = node;
  int dtmHandle = dtmMgr.getDTMHandleFromNode(node);
  setObject(new NodeSetDTM(dtmMgr));
  ((NodeSetDTM) m_obj).addNode(dtmHandle);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:XNodeSetForDOM.java

示例2: mutableNodeset

import com.sun.org.apache.xpath.internal.NodeSetDTM; //导入依赖的package包/类
/**
 * Cast result object to a nodelist. Always issues an error.
 *
 * @return The object as a NodeSetDTM.
 *
 * @throws javax.xml.transform.TransformerException
 */
public NodeSetDTM mutableNodeset()
        throws javax.xml.transform.TransformerException
{

  error(XPATHErrorResources.ER_CANT_CONVERT_TO_MUTABLENODELIST,
        new Object[]{ getTypeString() });  //"Can not convert "+getTypeString()+" to a NodeSetDTM!");

  return (NodeSetDTM) m_obj;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:XObject.java

示例3: XNodeSet

import com.sun.org.apache.xpath.internal.NodeSetDTM; //导入依赖的package包/类
/**
 * Construct a XNodeSet object for one node.
 *
 * @param n Node to add to the new XNodeSet object
 */
public XNodeSet(int n, DTMManager dtmMgr)
{

  super(new NodeSetDTM(dtmMgr));
  m_dtmMgr = dtmMgr;

  if (DTM.NULL != n)
  {
    ((NodeSetDTM) m_obj).addNode(n);
    m_last = 1;
  }
  else
      m_last = 0;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:XNodeSet.java

示例4: getLength

import com.sun.org.apache.xpath.internal.NodeSetDTM; //导入依赖的package包/类
/**
 * @see DTMIterator#getLength()
 */
public int getLength()
{
  IteratorCache cache = getCache();

      if(cache != null)
      {
      // Nodes from the iterator are cached
      if (cache.isComplete()) {
          // All of the nodes from the iterator are cached
          // so just return the number of nodes in the cache
          NodeVector nv = cache.getVector();
          return nv.size();
      }

      // If this NodeSequence wraps a mutable nodeset, then
      // m_last will not reflect the size of the nodeset if
      // it has been mutated...
      if (m_iter instanceof NodeSetDTM)
      {
          return m_iter.getLength();
      }

              if(-1 == m_last)
              {
                      int pos = m_next;
                      runTo(-1);
                      m_next = pos;
              }
          return m_last;
      }
      else
      {
              return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
      }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:NodeSequence.java


注:本文中的com.sun.org.apache.xpath.internal.NodeSetDTM类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。