[jdom-interest] Resetting the Root Element
grzegorz.kaczor at gmail.com
Tue Nov 6 01:13:02 PST 2007
you can create a new document and add to it contents of the root element.
Element root = new Element("new_root");
or something similar (I am writing from memory).
2007/11/5, Sebastian Hinterwälder <hintsn at idmt.fraunhofer.de>:
> I have a question concerning the root element of a normal XML document.
> Probably something like this already appeared in this list some time
> ago, but I don't get my problem solved so far.
> I have a normal "ATOM feed" which looks something like this:
> <?xml version="1.0" encoding="utf-8"?>
> <!-- generator="FeedCreator 1.6" -->
> <feed xmlns="http://www.w3.org/2005/Atom"
> <subtitle>IT-News fuer Profis</subtitle>
> Now I want to set a different root element using JDOM. I already tried
> it by cloning the whole document but this doesn't work. A different
> solution for me would also be removing the namespaces from the root. I
> am quite new to JDOM - so I hope someone knows a solution!
> Thanks in advance
> To control your jdom-interest membership:
"Choć tyle wiemy własnym doświadczeniem:
W nas jest Raj, Piekło - i do obu - szlaki."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest