Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

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

Mert Nuhoglu

2005-08-13

Replies:

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

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.