Converting
Java objects to XML can be done through SAX and DOM. You have to do
a lot of coding and work on the logics to convert so. Working with these
APIs is needed extensively to get your job done.
_______________________________________________
Now
there is another framework which is a set of classes and methods called
the Quick framework which is XML API. You can use this Quick framework
to convert between Java objects and XML without much coding and the
complexity of the previous APIs.
Quick is
a data binding framework by which you can easily convert your data in
Java in to XML documents. You can map your Java objects to XML without
much effort if you are using this Quick framework.
You need
not deal with the elements and the attributes when you are using this
framework. Now people spend hours of precious time reading the XML specifications
to do this task.
To work
with the Quick framework, you need to have your Java objects, XML, and
the DTD in place. Once they are there you need to use Quick to map them
to other format which is usually XML. However multiple steps are involved
in this process.
First a
QDML file is created from the DTD, and then a QJML file is created from
the QDML and then a QIML file is created from QJML. Finally the QIML
is used to map Java objects to XML.