There are
many methods by which you can write an XML document. You can do so by
a simple method using the PrintWriter object. With this method you can
use the out.println() method which is the standard way of writing content
to a file.
_______________________________________________
_______________________________________________
The
other way to write an XML document is to use the XStream object. By
using this object you can serialize the Java objects to an XML format.
For this you have to include the class com.thoughtworks.xstream.XStream.
Once you
create an object of this class you can use the toXML() method to serialize
the object. This method takes the class to be serialized as a parameter.
Using Java
API for XML Processing is the easiest way to write an XML file. With
this API you can create document objects and create an XML file into
it.
Or you
can load an existing XML document in to that document object and then
manipulate the XML document using the methods available for the document
object.
If you
are creating an XML file using the document object then you can use
the methods like createTextNode() and appendChild() to create a text
node and add them to the root node.
The Six Kinds of Anti-FOSS Trolls (Linux Today)
"Since I wrote about the seven kinds of anti-Linux FUD pundits, it occurred to me that plain old forum and blog-comment trolls could be classified, too.
Bill Gates has gone, what's his legacy? (The Register - Technology News via Yahoo! UK & Ireland News)
This week marks another first in the 33-year history of Microsoft - life without Billg.
Access FREE Mainsoft Tools: (Linux Today)
Demo: Integrate Microsoft SharePoint into IBM Lotus Notes Mainsoft's SharePoint Integrator for Lotus Notes is an easy-to-deploy, client side plug-in that gives Notes users easy access to Microsoft SharePoint document libraries.