本文整理了Java中org.dom4j.Element.isRootElement()
方法的一些代码示例,展示了Element.isRootElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.isRootElement()
方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:isRootElement
[英]DOCUMENT ME!
[中]记录我!
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public boolean isRootElement() {
return element.isRootElement();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public boolean isRootElement() {
return element.isRootElement();
}
代码示例来源:origin: hibernate/hibernate
public boolean isRootElement() {
return element.isRootElement();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public boolean isRootElement() {
return element.isRootElement();
}
代码示例来源:origin: hibernate/hibernate
public boolean isRootElement() {
return target().isRootElement();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public boolean isRootElement() {
return target().isRootElement();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public boolean isRootElement() {
return target().isRootElement();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public boolean isRootElement() {
return target().isRootElement();
}
代码示例来源:origin: org.dom4j/dom4j
if (origElement.isRootElement()) {
代码示例来源:origin: isuwang/isuwang-soa
public static String getNodes(Element node) {
StringBuffer sb = new StringBuffer();
if (node.elements().size() == 0) {
sb.append(String.format("\"%s\":%s,", node.getName(), "".equals(node.getTextTrim()) ? "{}" : node.getTextTrim()));
} else {
if (!node.isRootElement()) {
sb.append(String.format("\"%s\":", node.getName()));
}
sb.append("{");
List<Element> listElement = node.elements();
for (int i = 0; i < listElement.size(); i++) {
String temp = getNodes(listElement.get(i));
if (i == listElement.size() - 1) {
sb.append(temp.substring(0, temp.length() - 1));
} else {
sb.append(temp);
}
}
sb.append("},");
}
return sb.toString();
}
代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary
if (oldElement.isRootElement()) {
throw new XMLException("You cannot replace the root element of the XML document.");
代码示例来源:origin: com.axway.ats.framework/ats-actionlibrary
/**
* Remove a XML element
*
* @param xpath XPath , pointing to a XML element
* @return this instance
* @throws XMLException
*/
@PublicAtsApi
public XmlText remove(
String xpath ) throws XMLException {
if (StringUtils.isNullOrEmpty(xpath)) {
throw new XMLException("Null/empty xpath is not allowed.");
}
Element element = findElement(xpath);
if (element != null) {
if (element.isRootElement()) {
throw new XMLException("You cannot remove the root element of the XML document.");
}
element.detach();
} else {
throw new XMLException("'" + xpath + "' is not a valid path");
}
return this;
}
代码示例来源:origin: dom4j/dom4j
if (origElement.isRootElement()) {
代码示例来源:origin: maven/dom4j
if (origElement.isRootElement()) {
代码示例来源:origin: org.jenkins-ci.dom4j/dom4j
if (origElement.isRootElement()) {
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
if (origElement.isRootElement()) {
代码示例来源:origin: apache/servicemix-bundles
if (origElement.isRootElement()) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
if (origElement.isRootElement()) {
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
if (origElement.isRootElement()) {
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
if (origElement.isRootElement()) {
内容来源于网络,如有侵权,请联系作者删除!