wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 41151
    
  45
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: 12761
    
    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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Writing XML using JAVA
 
Similar Threads
XML validation
Java And XML
representing as XML
how to create XML files using Java Language
How do i call a java method from xsl?