Java-Channel

XmlWriter

URL: http://xmlwriter.sourceforge.net/

Added by: Bayard (at 5:38 PM - 9/23/02 - last modified 4:01 PM 11/6/02 )

Rating: Good

Categories:  I/O ,  ProductHome page for free or commercial product (classes, packages, beans, tools, ...) ,  Apache SLApache Software License ,  XML
other recommendation in the checked categories

An API for easily outputting XML. No automatic generation from object-trees, just a simple Writer-pattern way to control the outputting of the XML.


Top


Edit your review Member Reviews

Bad   Worst I have seen by Al Green

Sucks and down right useless

Top

Exceptional   Easy there killer! by Cached

Worst you've seen? Sucks and down right useless? Much like your review there, Al.

Top

Good   Good for some situations by GerryG

Reasonable but useful for only certain situations. Certainly not useless. I've been using NanoXML-Lite recently and like it's model better, but I can see how XmlWriter could be useful in quick and dirty situations.

Here's an example program and output built with NanoXML-Lite for comparision to the one XmlWriter has on it's homepage.

//SRC
XMLElement game = new XMLElement();
game.setName( "game" );
game.setAttribute( "name", "Happy Fun War" );
game.setAttribute( "description", "Battle between 2 planets" );
game.setContent( "This game is about a war between two planets. One has a
lot of people and little money, the other has a lot of money and little
people." );

System.out.println( game.toString() );

//OUTPUT

<game NAME="Happy Fun War" DESCRIPTION="Battle between 2 planets">
   This game is about a war between two planets. One has a lot of people and little money, the other has a lot of money and little people.
</game>

Top



Printed: September 9, 2010 - 11:15 PM - URL: http://www.java-channel.org/display.jsp?id=c_10342