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

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

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

XppDom.addChild介绍

暂无

代码示例

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

if (depth > 0) {
  XppDom parent = (XppDom)elements.get(depth - 1);
  parent.addChild(child);

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

protected Object createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

代码示例来源:origin: senbox-org/snap-desktop

private void setParamsToConfiguration(final XppDom config) {
  if (paramMap == null) return;
  final Set<String> keys = paramMap.keySet();                     // The set of keys in the map.
  for (String key : keys) {
    final Object value = paramMap.get(key);             // Get the value for that key.
    if (value == null) continue;
    XppDom xml = config.getChild(key);
    if (xml == null) {
      xml = new XppDom(key);
      config.addChild(xml);
    }
    xml.setValue(value.toString());
  }
}

代码示例来源:origin: senbox-org/snap-desktop

void AssignDisplayParameters(final XppDom presentationXML) {
  XppDom nodeElem = null;
  for (XppDom elem : presentationXML.getChildren()) {
    final String id = elem.getAttribute("id");
    if (id != null && id.equals(node.getId())) {
      nodeElem = elem;
      break;
    }
  }
  if (nodeElem == null) {
    presentationXML.addChild(displayParameters);
  }
  XppDom dpElem = displayParameters.getChild("displayPosition");
  if (dpElem == null) {
    dpElem = new XppDom("displayPosition");
    displayParameters.addChild(dpElem);
  }
  dpElem.setAttribute("y", String.valueOf(displayPosition.getY()));
  dpElem.setAttribute("x", String.valueOf(displayPosition.getX()));
}

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

if (depth > 0) {
  final XppDom parent = elements.get(depth - 1);
  parent.addChild(child);

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

if (depth > 0) {
  XppDom parent = (XppDom)elements.get(depth - 1);
  parent.addChild(child);

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

if (depth > 0) {
  XppDom parent = (XppDom)elements.get(depth - 1);
  parent.addChild(child);

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

if (depth > 0) {
  XppDom parent = (XppDom)elements.get(depth - 1);
  parent.addChild(child);

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

if (depth > 0) {
  XppDom parent = (XppDom)elements.get(depth - 1);
  parent.addChild(child);

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

if (depth > 0) {
  XppDom parent = (XppDom)elements.get(depth - 1);
  parent.addChild(child);

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

@Override
protected XppDom createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

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

protected Object createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

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

protected Object createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

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

protected Object createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

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

protected Object createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

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

protected Object createNode(final String name) {
  final XppDom newNode = new XppDom(encodeNode(name));
  final XppDom top = top();
  if (top != null) {
    top().addChild(newNode);
  }
  return newNode;
}

代码示例来源:origin: senbox-org/snap-desktop

private void AssignAllParameters() throws GraphException {
  final XppDom presentationXML = new XppDom("Presentation");
  // save graph description
  final XppDom descXML = new XppDom("Description");
  descXML.setValue(graphDescription);
  presentationXML.addChild(descXML);
  graphNodeList.assignParameters(presentationXML);
  graph.setAppData("Presentation", presentationXML);
}

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

XppDom font = new XppDom("font");
font.setValue("big");
xpp3Dom.addChild(font);
graph1.setAppData("foo", xpp3Dom);
XppDom colour = new XppDom("colour");
colour.setValue("red");
xpp3Dom2.addChild(colour);
graph1.setAppData("baz", xpp3Dom2);

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

public void testApplicationData() throws Exception {
  Graph graph = new Graph("chain1");
  assertNull(graph.getApplicationData("foo"));
  XppDom xpp3Dom1 = new XppDom("");
  XppDom font = new XppDom("font");
  font.setValue("big");
  xpp3Dom1.addChild(font);
  graph.setAppData("foo", xpp3Dom1);
  assertSame(xpp3Dom1, graph.getApplicationData("foo"));
  XppDom xpp3Dom2 = new XppDom("");
  XppDom font2 = new XppDom("font");
  font2.setValue("small");
  xpp3Dom2.addChild(font2);
  graph.setAppData("foo", xpp3Dom2);
  assertSame(xpp3Dom2, graph.getApplicationData("foo"));
}

相关文章