Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Converting org.dom4j.Document into org.w3c.dom.Document

843834Aug 10 2005 — edited Jun 21 2006
Can somebody help me with a code segment describing, how to convert a org.dom4j.Document into org.w3c.dom.Document.
I already tried the following, but it doesnot work

ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(dom4jDoc.asXML().getbytes());
InputSource inputsource = new InputSource(bytearrayinputstream);
Document document = null;
try
{
document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputsource);

dom4jDoc is an org.dom4j.Document & document is of type org.w3c.dom.Document.

Please help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2006
Added on Aug 10 2005
7 comments
1,208 views