File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes java to xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "java to xml" Watch "java to xml" New topic
Author

java to xml

Njk Naresh
Greenhorn

Joined: Nov 16, 2006
Posts: 11
Hi folks,
can any one give a source code for creation of xml file by using java.
we are using struts
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
http://www.ibiblio.org/xml/books/xmljava/chapters/ch03s02.html

has your answer..


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
castor and xStreams are the right framework to be used for your kind of requirement.Have a look them.


Rahul Bhattacharjee
LinkedIn - Blog
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

do you want to create XML from Java Objects or you want to create XML using Java?

If you want to create XML to Java Objects and Vice versa, then as Rahul suggested XSTREAM or Castor.

If you want to create XML using Java then dom4j and off course there other lots of open source libraries avaliable.

simple google search will give you link to those.


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42594
    
  65
If the classes you want to turn into XML are JavaBeans, then you can use the java.beans.XMLEncoder and XMLDecoder classes. It doesn't get any easier than that.


Ping & DNS - my free Android networking tools app
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
use jsse.jar and sax2.jar in your java classpath.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java to xml