本文整理了Java中org.apache.abdera.model.Element.getNextSibling()
方法的一些代码示例,展示了Element.getNextSibling()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getNextSibling()
方法的具体详情如下:
包路径:org.apache.abdera.model.Element
类名称:Element
方法名:getNextSibling
[英]Get the element following this one
[中]获取下面的元素
代码示例来源:origin: org.apache.abdera/abdera-core
public <T extends Element> T getNextSibling() {
return (T)internal.getNextSibling();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera
@SuppressWarnings("unchecked")
public <T extends Element> T getNextSibling() {
return (T) internal.getNextSibling();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera
@SuppressWarnings("unchecked")
public <T extends Element> T getNextSibling(QName qname) {
return (T) internal.getNextSibling(qname);
}
代码示例来源:origin: org.apache.abdera/abdera-core
public <T extends Element> T getNextSibling(QName qname) {
return (T)internal.getNextSibling(qname);
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public <T extends Element> T getNextSibling(QName qname) {
Element el = getNextSibling();
while (el != null) {
OMElement omel = (OMElement)el;
if (omel.getQName().equals(qname))
return (T)getWrapped((Element)omel);
el = el.getNextSibling();
}
return null;
}
代码示例来源:origin: org.apache.ws.commons.axiom/fom-testsuite
@Override
protected void runTest() throws Throwable {
Feed feed = abdera.getFactory().newFeed();
Entry entry = feed.addEntry();
Element addedChild = addChild(feed);
Element child = feed.getFirstChild();
// Entries must come after any other type of child elements
assertThat(child).isSameAs(addedChild);
assertThat(child.getNextSibling()).isSameAs(entry);
}
代码示例来源:origin: org.apache.ws.commons.axiom/fom-testsuite
@Override
protected void runTest() throws Throwable {
Person person = abdera.getFactory().newContributor();
person.setEmail("info@example.com");
Element child = person.getFirstChild();
assertThat(child).isNotNull();
assertThat(child.getText()).isEqualTo("info@example.com");
person.setEmail("webmaster@example.com");
child = person.getFirstChild();
assertThat(child).isNotNull();
assertThat(child.getText()).isEqualTo("webmaster@example.com");
assertThat(child.getNextSibling()).isNull();
person.setEmail(null);
assertThat(person.getFirstChild()).isNull();
}
}
内容来源于网络,如有侵权,请联系作者删除!