File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java API for xml generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java API for xml generation" Watch "Java API for xml generation" New topic

Java API for xml generation

Jagdev Singh
Ranch Hand

Joined: Jan 12, 2010
Posts: 71

Hi All,

I need to generate the xml file from database(Strings).Which is the best open source API from performance ,scalability and usability point of view.In xml I need to put attributes,and Schema statements in generated file.

Thanks in Advance
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 132

You can have a look at jaxb to achieve this.
Good Luck!!!
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Personally, I just write that kind of XML document with straight println and other plain old Java statements, it all depends with what you are comfortable with.

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
There very rarely is a single "best" of anything. What's more, what "best" is would depend on your circumstances, about which we know nothing. I might choose XOM for this, unless it's a really simple format, in which case Bill's suggestion is a good one.
Jagdev Singh
Ranch Hand

Joined: Jan 12, 2010
Posts: 71

Thanks to all for yours suggestions.
I will go for approach suggested by william.
I agree. Here's the link:
subject: Java API for xml generation
It's not a secret anymore!