org.dom4j.Document.nodeCount()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(111)

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

Document.nodeCount介绍

暂无

代码示例

代码示例来源:origin: igniterealtime/Openfire

/** <p>This will print the <code>Document</code> to the current Writer.</p>
 *
 * <p> Warning: using your own Writer may cause the writer's
 * preferred character encoding to be ignored.  If you use
 * encodings other than UTF8, we recommend using the method that
 * takes an OutputStream instead.  </p>
 *
 * <p>Note: as with all Writers, you may need to flush() yours
 * after this method returns.</p>
 *
 * @param doc <code>Document</code> to format.
 * @throws IOException - if there's any problem writing.
 **/
public void write(Document doc) throws IOException {
  writeDeclaration();
  if (doc.getDocType() != null) {
    indent();
    writeDocType(doc.getDocType());
  }
  for ( int i = 0, size = doc.nodeCount(); i < size; i++ ) {
    Node node = doc.node(i);
    writeNode( node );
  }
  writePrintln();
  if ( autoFlush ) {
    flush();
  }
}

代码示例来源:origin: org.dom4j/dom4j

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: org.dom4j/dom4j

/**
 * Processes the input object in the given mode. If input is a
 * <code>Node</code>, this will processes all of the children of that
 * node. If input is a <code>List</code> of <code>Nodes</code>s, these
 * nodes will be iterated and all children of each node will be processed.
 *
 * @param document the input object
 * @param mode
 *            the mode
 * @throws Exception
 *             if something goes wrong
 */
public void applyTemplates(Document document, String mode) throws Exception {
  Mode mod = ruleManager.getMode(mode);
  // iterate through all children
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    mod.fireRule(node);
  }
}

代码示例来源:origin: org.dom4j/dom4j

for (int i = 0, size = doc.nodeCount(); i < size; i++) {
  Node node = doc.node(i);
  writeNode(node);

代码示例来源:origin: theonedev/onedev

public int nodeCount() {
  return getWrapped().nodeCount();
}

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

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: org.dom4j/com.springsource.org.dom4j

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: org.jenkins-ci.dom4j/dom4j

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: maven/dom4j

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

代码示例来源:origin: apache/servicemix-bundles

public void applyTemplates(Document document) throws Exception {
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    fireRule(node);
  }
}

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

/**
 * Processes the input object in the given mode. If input is a
 * <code>Node</code>, this will processes all of the children of that
 * node. If input is a <code>List</code> of <code>Nodes</code>s, these
 * nodes will be iterated and all children of each node will be processed.
 *
 * @param document the input object
 * @param mode
 *            the mode
 * @throws Exception
 *             if something goes wrong
 */
public void applyTemplates(Document document, String mode) throws Exception {
  Mode mod = ruleManager.getMode(mode);
  // iterate through all children
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    mod.fireRule(node);
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Processes the input object in the given mode. If input is a
 * <code>Node</code>, this will processes all of the children of that
 * node. If input is a <code>List</code> of <code>Nodes</code>s, these
 * nodes will be iterated and all children of each node will be processed.
 *
 * @param document the input object
 * @param mode
 *            the mode
 * @throws Exception
 *             if something goes wrong
 */
public void applyTemplates(Document document, String mode) throws Exception {
  Mode mod = ruleManager.getMode(mode);
  // iterate through all children
  for (int i = 0, size = document.nodeCount(); i < size; i++) {
    Node node = document.node(i);
    mod.fireRule(node);
  }
}

代码示例来源:origin: org.igniterealtime.openfire/xmppserver

/** <p>This will print the <code>Document</code> to the current Writer.</p>
 *
 * <p> Warning: using your own Writer may cause the writer's
 * preferred character encoding to be ignored.  If you use
 * encodings other than UTF8, we recommend using the method that
 * takes an OutputStream instead.  </p>
 *
 * <p>Note: as with all Writers, you may need to flush() yours
 * after this method returns.</p>
 *
 * @param doc <code>Document</code> to format.
 * @throws IOException - if there's any problem writing.
 **/
public void write(Document doc) throws IOException {
  writeDeclaration();
  if (doc.getDocType() != null) {
    indent();
    writeDocType(doc.getDocType());
  }
  for ( int i = 0, size = doc.nodeCount(); i < size; i++ ) {
    Node node = doc.node(i);
    writeNode( node );
  }
  writePrintln();
  if ( autoFlush ) {
    flush();
  }
}

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

for (int i = 0, size = doc.nodeCount(); i < size; i++) {
  Node node = doc.node(i);
  writeNode(node);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

for (int i = 0, size = doc.nodeCount(); i < size; i++) {
  Node node = doc.node(i);
  writeNode(node);

代码示例来源:origin: maven/dom4j

for (int i = 0, size = doc.nodeCount(); i < size; i++) {
  Node node = doc.node(i);
  writeNode(node);

代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j

for (int i = 0, size = doc.nodeCount(); i < size; i++) {
  Node node = doc.node(i);
  writeNode(node);

相关文章