[jdom-interest] promoting namespaces up trees

Edelson, Justin Justin.Edelson at mtvn.com
Tue Apr 11 18:58:25 PDT 2006

Check out Element.addNamespaceDeclaration(Namespace). 

-----Original Message-----
From: jdom-interest-bounces at jdom.org
[mailto:jdom-interest-bounces at jdom.org] On Behalf Of Bart Locanthi
Sent: Tuesday, April 11, 2006 8:52 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] promoting namespaces up trees

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

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

i of course want it to look like

<item xmlns:x="blah blah">

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:

More information about the jdom-interest mailing list