File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Java objects into XML file and vice-versa. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Java objects into XML file and vice-versa." Watch "Java objects into XML file and vice-versa." New topic

Java objects into XML file and vice-versa.

Grigory Ptashko

Joined: Feb 21, 2003
Posts: 9
I'm new to XML and really do not know where to begin from.
My application must have a feature of converting simple java objects to XLM and back.
For example I have an ArrayList of Strings and I want to save them in XML. And later on I want to use them again.
What tools should I use for this ?
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150

Spritle Software Blogs
Andy Bowes
Ranch Hand

Joined: Jan 14, 2003
Posts: 171
Providing you can define a XML Schema for the XML that you will be generating, JAXB would certainly be the most appropriate candidate for the job.

Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Electric XML is another neat product in this space - Java to XML and back.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: Java objects into XML file and vice-versa.
It's not a secret anymore!