This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes create xml through java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "create xml through java" Watch "create xml through java" New topic
Author

create xml through java

kavi ram
Greenhorn

Joined: Jun 12, 2006
Posts: 13
hi,
i am new to xml. i want to fetch data from database through java class and store xml file. this is my process. i want to know how to create xml file through java class. anyone please help me.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35249
    
    7
There are various ways to do this. In simple cases you might just write directly to a file, using the java.io classes.


For anything that's not trivial, construct an in-memory representation using DOM, and then serialize that to a file once it's complete. Here's an introduction on how to do that. All classes needed for that are part of the the JDK, so you don't need to download anything else.


Android appsImageJ pluginsJava web charts
 
jQuery in Action, 2nd edition
 
subject: create xml through java
 
Similar Threads
Xml File Creation......
problem in creating xml
Multiple Tiles Definition files OR passing parameters to tiles.xml at runtime
Developing GUI through XML
Transfer file onto a remote server using FTP and SFTP both.