[jdom-interest] XmlOutputter - printNamespace - NO_NAMESPACE outputs xmlns="", bug?

Phill_Perryman at Mitel.COM Phill_Perryman at Mitel.COM
Mon Jul 7 01:38:36 PDT 2003


> And dummies like myself could write 
Document.setOption(inheritNamespaces),
> and go on with simple code.

I usually create the whole root before creating a document so any command 
related to the Document would not work anyway.

One of the nice things about Java is if you don't like the base class then 
extend it and override the bits with your own.

public class MyElement extends Element..... then override the constructor 
of MyElement to put it into a namesapce.

Then create a MyJDOMFactory which creates MyElement and MyDocument classes 
and you can change JDOM's behaviour without affecting anyone else. JDOM 
should provide the basic commonly agreed functionality.  For instance 
MyEelement has a getAttributeInteger(String name) function as I have a lot 
of attributes with numeric values. I also don't like the way JDOM gives up 
if with a null value for an attribute, in my environment I have a lot of 
optional attributes so I changed it, I don't see the JDOM folks changing 
JDOM just to suit my environment.


/Phill
IS Dept, Software Engineer.
phill_perryman at mitel.com
http://www.mitel.com
Tel: +44 1291 436023
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030707/6e9f777b/attachment.htm


More information about the jdom-interest mailing list