Java Mailing List Archive

http://www.junlu.com/

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

[jdom-interest] promoting namespaces up trees

Bart Locanthi

2006-04-11

Replies:

i've been expending too much cleverness to solve this problem and i'm
wondering if there's a better way.

i have generated data that looks like

<item>
<x:foo xmlns:x="blah blah"/>
<x:bar xmlns:x="blah blah"/>
...
</item>

i of course want it to look like

<item xmlns:x="blah blah">
<x:foo/>
<x:bar/>
...
</item>

i've played games with pre-pushed Namespace.Stacks, but you wind up
having to print the header by hand because the codeto do this inside
XMLOutputter isn't factored or exposed.

is there a simple way of getting the desired result?

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