[jdom-interest] DOMBuilder, from DOM tree to JDom tree

Xuemin Guan xuemin at appresso.com
Thu Sep 13 07:30:12 PDT 2001


Hi, there, we just started to use JDom in our project, it is really
nice. But we encountered one problem with DOMBuilder today, and
desperately need help.

I have a JDom Document, I first convert it to a DOM Document in order
to work with another application which need to be fed in a DOM Document.
I then convert the DOM Document back to a JDom Document using DOMBuilder,
however, DOMBuilder.build(domDoc) throws org.jdom.IllegalAddException.
For the time being, I am serilizing the DOM Document to work around this
problem.

The code snippet which causes troubles is as the following:

	org.w3c.dom.Document domDoc = (org.w3c.dom.Document) data;
        DOMBuilder builder = new DOMBuilder();
        org.jdom.Document jdomDoc = builder.build(domDoc);

If you have an idea, please help me!

Best regards,
-------
Xuemin Guan
Software Engineer
Appresso SpA (www.appresso.com)
Tel:  +81-3-4412-7790(Direct)
        +81-3-4412-7700(Represent)
Email: xuemin at appresso.com 




More information about the jdom-interest mailing list