With Java
you can generate XML in many ways. One of the ways is to write the XML
code using the out.println() statement and generate the XML file you
need using the PrintWriter. However this method is very straightforward
and there is no guarantee that the generated XML file would be error
free.
_______________________________________________
_______________________________________________
Another
way is to use the Java API for XML Processing. By using this method
you can create a document object and then create the different elements
of the XML file using the Element object. The document object has methods
for this purpose.
Methods
like appendChild() and createTextNode() are used in creating the text
nodes and then adding them to the root node of the XML document.
One another
way to generate XML from Java is to serialize the Java objects in to
XML using the XStream class. With this method you can easily serialized
the Java objects to XML. For example if you have a class 'person', you
can serialize that with the statement,
String
xml = xs.toXML(person);
In the
above statement 'xs' is the XStream object. To work with this object
you have to import com.thoughtworks.xstream.XStream.
Blog change? Ads? What gives? (Java World)
Submitted by Ted Neward on Wed, 07/16/2008 - 19:29. If you've peeked at my blog site in the last twenty minutes or so, you've probably noticed some churn in the template in the upper-left corner; by now, it's been finalized, and it reads "JOB REFERRALS".
MDA Approach - Part 1 (Java World)
Submitted by lal on Wed, 07/16/2008 - 04:12. Tags: Model Driven Architecuture [MDA] is a model driven engineering approach provided by OMG. It provides a set of guidelines for structuring specifications [for eg. business functionality] expressed as models.
Linked by Eugenia Loli-Queru on Fri 25th Aug 2006 23:55 UTC (OS News)
Vista will be the last version of Windows that exists in its current, monolithic form, according to Gartner. Instead, the research firm predicts, Microsoft will be forced to migrate Windows to a modular architecture tied together through hardware-supported virtualisation.