|
1.
Good for some situations
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>
Reviewed by: GerryG
- October 3, 2002
|