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.
Member Reviews
Worst I have seen by Al Green
Sucks and down right useless
Easy there killer! by Cached
Worst you've seen? Sucks and down right useless? Much like your review there, Al.
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>