[jdom-interest] getSerializedForm() [eg]

philip.nelson at omniresources.com philip.nelson at omniresources.com
Tue Apr 24 17:04:52 PDT 2001


> > 1. Remove getSerializedForm() and have toString() output
> >  something non-XML like "[ProcessingInstruction: target: pi 
> data: data]"
> > * No dependencies in org.jdom on org.jdom.output
> > * But ugly toString()
> > * Ugly new XMLOutputter.outputString(elt) instead of
> >   elt.getSerializedForm()
> >
> 
> +1 on #1
> 
> The argument for deprecating getSF is that it relies on 
> context that ought
> to be maintained in an outputter?  I'll buy that: if the user 
> wants to get a
> nice XML representation, they should use an outputter.

Not having ever had a reason to use either getSF or tostring except for in
the debugger, my opinion probably isn't worth much.  But I would think no
single way of outputting would be right anyway, so I think #1 is the right
answer.



More information about the jdom-interest mailing list