nu.xom.Element.removeChildren()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(255)

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

Element.removeChildren介绍

暂无

代码示例

代码示例来源:origin: nu.validator/htmlparser

Nodes getDocumentFragment() {
  Element rootElt = document.getRootElement();
  Nodes rv = rootElt.removeChildren();
  document = null;
  return rv;
}

代码示例来源:origin: nu.validator.htmlparser/htmlparser

Nodes getDocumentFragment() {
  Element rootElt = document.getRootElement();
  Nodes rv = rootElt.removeChildren();
  document = null;
  return rv;
}

代码示例来源:origin: validator/htmlparser

Nodes getDocumentFragment() {
  Element rootElt = document.getRootElement();
  Nodes rv = rootElt.removeChildren();
  document = null;
  return rv;
}

代码示例来源:origin: nu.validator.htmlparser/htmlparser

@Override
protected void appendChildrenToNewParent(Element oldParent,
    Element newParent) throws SAXException {
  try {
    Nodes children = oldParent.removeChildren();
    for (int i = 0; i < children.size(); i++) {
      newParent.appendChild(children.get(i));
    }
  } catch (XMLException e) {
    fatal(e);
  }
}

代码示例来源:origin: nu.validator/htmlparser

@Override
protected void appendChildrenToNewParent(Element oldParent,
    Element newParent) throws SAXException {
  try {
    Nodes children = oldParent.removeChildren();
    for (int i = 0; i < children.size(); i++) {
      newParent.appendChild(children.get(i));
    }
  } catch (XMLException e) {
    fatal(e);
  }
}

代码示例来源:origin: com.internetitem/create-reactor-core

public static void maybeAddElement(Element e, String namespace, String name, String value) {
  if (value == null) {
    return;
  }
  Element child = e.getFirstChildElement(name, namespace);
  if (child != null) {
    child.removeChildren();
  } else {
    child = new Element(name, namespace);
    e.appendChild(child);
  }
  child.appendChild(value);
}

代码示例来源:origin: validator/htmlparser

@Override
protected void appendChildrenToNewParent(Element oldParent,
    Element newParent) throws SAXException {
  try {
    Nodes children = oldParent.removeChildren();
    for (int i = 0; i < children.size(); i++) {
      newParent.appendChild(children.get(i));
    }
  } catch (XMLException e) {
    fatal(e);
  }
}

代码示例来源:origin: net.sf.opendse/opendse-io

protected nu.xom.Element toElement(Architecture<Resource, Link> routing, Architecture<Resource, Link> architecture) {
  nu.xom.Element eArch = new nu.xom.Element("routing", NS);
  for (Resource resource : routing) {
    nu.xom.Element element = toElement(resource, "resource", true);
    if (resource.getParent() != architecture.getVertex(resource.getId())) {
      element.removeChildren();
    }
    eArch.appendChild(element);
  }
  for (Link link : routing.getEdges()) {
    Pair<Resource> endpoints = routing.getEndpoints(link);
    nu.xom.Element element = toElement(link, "link", endpoints.getFirst(), endpoints.getSecond(),
        routing.getEdgeType(link), true);
    if (link.getParent() != architecture.getVertex(link.getId())) {
      element.removeChildren();
    }
    eArch.appendChild(element);
  }
  return eArch;
}

相关文章