jQuery in Action, 2nd edition*
The moose likes XML and Related Technologies and the fly likes Writing XML using JAVA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Writing XML using JAVA" Watch "Writing XML using JAVA" New topic
Author

Writing XML using JAVA

ramnna jain
Ranch Hand

Joined: Mar 16, 2009
Posts: 129

Is it possible to write XML using Java code...
Sultan Khadar
Ranch Hand

Joined: Sep 12, 2006
Posts: 75
Yes Jain.. it is possible.. see the below code snippet
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42360
    
  64
There are many ways to do that, the easiest being the BufferedWriter, OutputStreamWriter and FileOutputStream classes used together.


Ping & DNS - my free Android networking tools app
ramnna jain
Ranch Hand

Joined: Mar 16, 2009
Posts: 129

Thanks Sultan & Ulf..

What is SAX & where to use it?

Can we use it to write XML using JAVA(SAX API).... ?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12809
    
    5
why do people ask these general questions here when a Google search will find answers faster

Google might turn up this FAQ page here at the ranch as a starting point.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing XML using JAVA