[jdom-interest] IllegalAddException: Cannot add a second root element, only one is allowed

Mert Nuhoglu mert.nuhoglu at gmail.com
Sat Aug 13 09:02:25 PDT 2005


Hi,

Document element doesn't allow to have more than one root. But I need
to generate an xml document that must have more than one root. What do
you suggest me to do?

A part of the document that I need to produce is here:

<!DOCTYPE RAVE><RAVE version="3.16.4">

<Institution>My institution</Institution>

<Comments>My comments</Comments>

Maybe I can produce the document in JDom where all the elements are
wrapped under a root element. Then I can remove this wrapper tag out
of the JDom.

Thanks...

-- 
Mert Nuhoglu
http://mert-nuhoglu.blogspot.com
http://mert-tr.blogspot.com



More information about the jdom-interest mailing list