Hi,<br><br>you can create a new document and add to it contents of the root element. <br><br>Element root = new Element("new_root");<br>root.addContent(oldRoot.removeContent());<br><br>or something similar (I am writing from memory).
<br><br>Regards,<br>Grzegorz<br><br><div><span class="gmail_quote">2007/11/5, Sebastian Hinterwälder <<a href="mailto:hintsn@idmt.fraunhofer.de">hintsn@idmt.fraunhofer.de</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I have a question concerning the root element of a normal XML document.<br>Probably something like this already appeared in this list some time<br>ago, but I don't get my problem solved so far.<br><br>I have a normal "ATOM feed" which looks something like this:
<br><br><?xml version="1.0" encoding="utf-8"?><br><!-- generator="FeedCreator 1.6" --><br><feed xmlns="<a href="http://www.w3.org/2005/Atom">http://www.w3.org/2005/Atom</a>
"<br> xmlns:dc="<a href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a>"<br> xml:lang="de"><br> <title><a href="http://Golem.de">Golem.de</a></title><br> <subtitle>IT-News fuer Profis</subtitle>
<br> ....<br><br>Now I want to set a different root element using JDOM. I already tried<br>it by cloning the whole document but this doesn't work. A different<br>solution for me would also be removing the namespaces from the root. I
<br>am quite new to JDOM - so I hope someone knows a solution!<br><br>Thanks in advance<br><br>Sebastian<br>_______________________________________________<br>To control your jdom-interest membership:<br><a href="http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com">
http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com</a><br></blockquote></div><br><br clear="all"><br>-- <br>"Choć tyle wiemy własnym doświadczeniem:<br>W nas jest Raj, Piekło - i do obu - szlaki."
<br>J.K.