[jdom-interest] SAXOutputter
Laurent Bihanic
laurent.bihanic at atosorigin.com
Thu Apr 22 09:36:58 PDT 2004
Bradley S. Huffman wrote:
> Well if output is for well-formed only, then do you suggest deprecating
> output(List)? Leaving the 3 core methods
>
> output(Document)
> output(Element)
> outputFragment(Content)
Well, no. I'm suggesting the following 5 methods :
output(Document)
output(List)
output(Element)
outputFragment(List)
outputFragment(Content)
output(Document) and output(Element) always output well-formed documents.
output(List) should remain as it is needed to send XML fragments to XSLT
processors, most of which probably expect start/endDocument events to be fired.
outputFragment(List/Content) methods are similar to XMLOutputter's
output(List/Element/Text/CDATA/PI/Comment, Writer) methods : No XML header in
XMLOutputter means no start/endDocument events in SAXOuputter.
The chosen names help warning the user against randomly choosing these methods
simply because if the type of node they want to output.
Laurent
More information about the jdom-interest
mailing list