com.thoughtworks.xstream.io.xml.xppdom.XppDom.getChildCount()方法的使用及代码示例

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

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

XppDom.getChildCount介绍

暂无

代码示例

代码示例来源:origin: com.thoughtworks.xstream/xstream

protected int getChildCount() {
  return currentElement.getChildCount();
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

代码示例来源:origin: com.thoughtworks.xstream/xstream

final int children = dom1.getChildCount();
s = dom2.getChildCount() - children;
if (s != 0) {
  xpath.append("::count(*)");

代码示例来源:origin: x-stream/xstream

@Override
protected int getChildCount() {
  return currentElement.getChildCount();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

protected int getChildCount() {
  return currentElement.getChildCount();
}

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

protected int getChildCount() {
  return currentElement.getChildCount();
}

代码示例来源:origin: com.haulmont.thirdparty/xstream

protected int getChildCount() {
  return currentElement.getChildCount();
}

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

protected int getChildCount() {
  return currentElement.getChildCount();
}

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

protected int getChildCount() {
  return currentElement.getChildCount();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

代码示例来源:origin: x-stream/xstream

@Override
public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

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

public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

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

public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

代码示例来源:origin: com.haulmont.thirdparty/xstream

public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

public String peekNextChild() {
  if (currentElement.getChildCount() == 0) {
    return null;
  }
  return decodeNode(currentElement.getChild(0).getName());
}

代码示例来源:origin: x-stream/xstream

final int children = dom1.getChildCount();
s = dom2.getChildCount() - children;
if (s != 0) {
  xpath.append("::count(*)");

代码示例来源:origin: org.sonatype.nexus.xstream/xstream

final int children = dom1.getChildCount();
s = dom2.getChildCount() - children;
if (s != 0) {
  xpath.append("::count(*)");

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

final int children = dom1.getChildCount();
s = dom2.getChildCount() - children;
if (s != 0) {
  xpath.append("::count(*)");

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8

final int children = dom1.getChildCount();
s = dom2.getChildCount() - children;
if (s != 0) {
  xpath.append("::count(*)");

代码示例来源:origin: bcdev/beam

public void testReadFromXMLWithAppData() throws Exception {
  String expectedXML =
      "<graph id=\"myOneNodeGraph\">\n" +
          "  <version>1.0</version>\n" +
          "  <node id=\"node1\">\n" +
          "    <operator>Op1</operator>\n" +
          "    <sources/>\n" +
          "  </node>\n" +
          " <applicationData id=\"foo\">\n" +
          "    <font>Big</font>\n" +
          "    <colour>red</colour>\n" +
          " </applicationData>\n" +
          " <applicationData id=\"bar\">\n" +
          "    <textmode>true</textmode>\n" +
          " </applicationData>\n" +
          "</graph>";
  StringReader reader = new StringReader(expectedXML);
  Graph graph = GraphIO.read(reader);
  XppDom fooData = graph.getApplicationData("foo");
  assertNotNull(fooData);
  assertEquals(2, fooData.getChildCount());
  assertEquals("Big", fooData.getChild("font").getValue());
  assertEquals("red", fooData.getChild("colour").getValue());
  XppDom barData = graph.getApplicationData("bar");
  assertNotNull(barData);
  assertEquals(1, barData.getChildCount());
  assertEquals("true", barData.getChild("textmode").getValue());
}

相关文章