File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating xml suing jsp

 
Sunesh Kumar
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I am developing an application in which i have to
1.insert values into database from xml
2.create xml using database values

in that i am successfull with first one , now i have to create an Xml file which is from all database tables...?

can u please your ideas with me...

bye...
 
Satish SN
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunesh,

i am not very much clear with u r second option ie u want to embed the database data from all tables into a xml file or all the data from a single table into a xml file.

the approach would be to use DOM to create a xml file and embed each value the way u want.

or try to build the xml file using the stringbuffer and manipulating the strings and finally write into a file using java.io
 
Krithika Srinath
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunesh,

You can use SAX or DOM parsers for capturing data from database and converting them into XML file.

In your case, I would suggest you to go for SAX parser since you are dealing with Structured data (data generated from SQL).

You may find this article useful to startwith.

Regards,
~Krithika
 
Sunesh Kumar
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Your suggestions helped me a lot
Thanks yaar

Bye
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic