org.apache.woden.XMLElement.setSource()方法的使用及代码示例

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

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

XMLElement.setSource介绍

[英]Accepts an Object representing an XML element. The implementation should check that it is of a type appropriate for the underlying XML parser or XML Object model being used. For example, a DOM implementation might expect an org.w3c.dom.Element while an AXIOM implementation might expect org.apache.axiom.om.OMElement.
[中]接受表示XML元素的对象。实现应该检查它的类型是否适合所使用的底层XML解析器或XML对象模型。例如,DOM实现可能需要一个组织。w3c。多姆。元素,而AXIOM实现可能需要组织。阿帕奇。公理嗯。OMElement。

代码示例

代码示例来源:origin: org.apache.woden/woden-core

protected XMLElement doGetFirstChildElement() {
  
  XMLElement xmlElement = new DOMXMLElement(fErrorReporter);
  Element el = (Element)fSource;
  for (Node node = el.getFirstChild(); node!=null; node=node.getNextSibling()){
    if (node.getNodeType() == Node.ELEMENT_NODE){
      xmlElement.setSource(node);
      return xmlElement;
    }
  }
  return null;  //no child element found
}

代码示例来源:origin: org.apache.woden/woden-impl-dom

protected XMLElement doGetFirstChildElement() {
  
  XMLElement xmlElement = new DOMXMLElement(fErrorReporter);
  Element el = (Element)fSource;
  for (Node node = el.getFirstChild(); node!=null; node=node.getNextSibling()){
    if (node.getNodeType() == Node.ELEMENT_NODE){
      xmlElement.setSource(node);
      return xmlElement;
    }
  }
  return null;  //no child element found
}

代码示例来源:origin: org.apache.woden/woden-core

protected XMLElement doGetNextSiblingElement() {
  
  XMLElement xmlElement = new DOMXMLElement(fErrorReporter);
  Element el = (Element)fSource;
  for (Node node = el.getNextSibling (); node != null; node = node.getNextSibling ()) {
    if (node.getNodeType() == Node.ELEMENT_NODE){
      xmlElement.setSource(node);
      return xmlElement;
    }
  }
  return null;  //no sibling element found
}

代码示例来源:origin: org.apache.woden/woden-impl-dom

protected XMLElement doGetNextSiblingElement() {
  
  XMLElement xmlElement = new DOMXMLElement(fErrorReporter);
  Element el = (Element)fSource;
  for (Node node = el.getNextSibling (); node != null; node = node.getNextSibling ()) {
    if (node.getNodeType() == Node.ELEMENT_NODE){
      xmlElement.setSource(node);
      return xmlElement;
    }
  }
  return null;  //no sibling element found
}

相关文章