[jdom-interest] XMLOutputter naming questions

Omen Red omenred at yahoo.com
Sat Sep 30 22:53:20 PDT 2000


Hi,
--- Alex Chaffee <guru at edamame.stinky.com> wrote:
> 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."
> 
> 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)
> 	etc.
> 
> Right?
> 
> 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?



As for me just "output" sounds shorter and nicer.
Besides "outputString" sounds redundant, Are you going
to return another type than String in future ???

Q: just little question, you mentioned 
>  	void output(Document d, OutputStream out)
>  	void output(Element e, OutputStream out)
>  	void output(Comment c, OutputStream out)
>  	void output(Entity e, OutputStream out)
functions above. Are you going to implement them as
public ? In case if yes maybe there is reason to add
also 
>  	void output(Document d, Writer out)
>  	void output(Element e, Writer out)
>  	void output(Comment c, Writer out)
>  	void output(Entity e, Writer out)
functions. Just proposal.

best regards,
Om.

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/



More information about the jdom-interest mailing list