[jdom-interest] XMLOutputter naming questions

Alex Chaffee guru at edamame.stinky.com
Sat Sep 30 12:49:29 PDT 2000

Just read TODO.txt: "Write
XMLOutputter.serialize(doc/elem/comment/doctype/entity/pi/attrib). Have
these methods replace getSerializedForm().  Going this way allows
tweaks to the XMLOutputter behavior before serialization."

I think "serialize" is the wrong word; "output" is better for this,
since it's consistent with the name of the object, isn't confused with
other meanings of "serialize," etc.

That means I should go ahead and write the following:

 	void output(Document d, OutputStream out)
 	void output(Element e, OutputStream out)
 	void output(Comment c, OutputStream out)
 	void output(Entity e, OutputStream out)


That means I only need to know whether to go with

> 	String output(Document d)
> 	String output(Element e)
> versus:
> 	String outputString(Document d)
> 	String outputString(Element e)

Any votes?

 - AleXMLOutputter

Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

More information about the jdom-interest mailing list