This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java API for xml generation" Watch "Java API for xml generation" New topic
Author

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: 131

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

Joined: Mar 22, 2000
Posts: 12760
    
    5
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.

Bill
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
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.


Ping & DNS - my free Android networking tools app
Jagdev Singh
Ranch Hand

Joined: Jan 12, 2010
Posts: 71

Thanks to all for yours suggestions.
I will go for approach suggested by william.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java API for xml generation
 
Similar Threads
How to add Attributes to a existing XML File.
XML/XSD to Database using Java
About server peerid in clustering
help on xml wit java
Comment Handling while parsing and building an xml file in xerces