[jdom-interest] output with namespace only on root element

tballen at copart.com tballen at copart.com
Mon Jun 9 08:03:11 PDT 2003

At 10:41 AM 6/9/2003 -0400, Elliotte Rusty Harold wrote:

>>When I use XMLOutputter to output the document all elements have the 
>>"cprt" namespace prefix but I only want the root element to show this.
>>Is this possible?
>>I guess I could add all child elements without a namespace but then the 
>>JDOM document would not be accurate.
>You misunderstand namespaces. Unprefixed child elements are *not* in the 
>same namespace as their parent element unless the default namespace is the 
>same as the namespace of the parent element.
>   Elliotte Rusty Harold
>   elharo at metalab.unc.edu
>   Processing XML with Java (Addison-Wesley, 2002)
>   http://www.cafeconleche.org/books/xmljava
>   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA

More information about the jdom-interest mailing list