[jdom-interest] Namespace help

Elliotte Rusty Harold elharo at metalab.unc.edu
Wed Jul 24 14:44:28 PDT 2002


>Thanks for all the clarification. I'm not sure if I stated my 
>problem clearly. I understand that if I want a namespace with an 
>element, I need to put it there. But in this case, I did not want 
>any and didn't put any in those 2nd level elements. So why is 
>Outputter still printing out xmlns=""? I didn't assign "" namespace 
>to those elements.
>

"" is not a namespace. It is no namespace at all, as per the 
namespaces spec. If JDOM didn't put them there, then they would 
inherit the default namespace from the root element.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list