本文整理了Java中org.dom4j.dom.DOMDocument.getRootElement()
方法的一些代码示例,展示了DOMDocument.getRootElement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DOMDocument.getRootElement()
方法的具体详情如下:
包路径:org.dom4j.dom.DOMDocument
类名称:DOMDocument
方法名:getRootElement
暂无
代码示例来源:origin: org.dom4j/dom4j
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: org.dom4j/dom4j
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: dom4j/dom4j
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: maven/dom4j
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: apache/servicemix-bundles
public org.w3c.dom.Element getDocumentElement() {
return DOMNodeHelper.asDOMElement(getRootElement());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: org.dom4j/com.springsource.org.dom4j
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: maven/dom4j
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: dom4j/dom4j
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Marshals the given {@link javax.xml.bind.Element}in to its DOM4J
* counterpart.
*
* @param element
* JAXB Element to be marshalled
*
* @return the marshalled DOM4J {@link org.dom4j.Element}
*
* @throws JAXBException
* when an error occurs
*/
protected org.dom4j.Element marshal(javax.xml.bind.Element element)
throws JAXBException {
DOMDocument doc = new DOMDocument();
getMarshaller().marshal(element, doc);
return doc.getRootElement();
}
代码示例来源:origin: dom4j/dom4j
public void testNamespace() throws Exception {
String xml = "<prefix:root xmlns:prefix=\"myuri\" />";
SAXReader xmlReader = new SAXReader(DOMDocumentFactory.getInstance());
DOMDocument d = (DOMDocument) xmlReader.read(new StringReader(xml));
assertEquals("namespace prefix not correct", "prefix", d
.getRootElement().getNamespace().getPrefix());
assertEquals("namespace uri not correct", "myuri", d.getRootElement()
.getNamespace().getURI());
System.out.println(d.asXML());
}
内容来源于网络,如有侵权,请联系作者删除!