Java Mailing List Archive

http://www.junlu.com/

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

[jdom-interest] Resetting the Root Element

Sebastian Hinterwälder

2007-11-05

Replies:

Hello,

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"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:lang="de">
  <title>Golem.de</title>
  <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

Sebastian
_______________________________________________
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.