本文整理了Java中org.apache.woden.XMLElement.setSource()
方法的一些代码示例,展示了XMLElement.setSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLElement.setSource()
方法的具体详情如下:
包路径:org.apache.woden.XMLElement
类名称: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
}
内容来源于网络,如有侵权,请联系作者删除!