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

Uploading xml to database

 
Smita Talawadekar
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

Can anyone tell me how to upload xml/pdf/txt file to database using hibernate/ejb/jdbc or any other way? please explain using sample code or example....

thanks in advance...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first step is to create a BLOB data type. (for PDF) or CLOB (XML or Text) Then take a look at the JDBC tutorial for how to insert it.
 
rex hindlekar
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also use API such as POI/IText/PDFOne/PDFBox or Spring framework which has these code.

Jeanne is right about the JDBC calls to put into the Blob objects in the DB.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also use API such as POI/IText/PDFOne/PDFBox or Spring framework which has these code.

None of these libraries has anything to do with storing a file in a DB (maybe Spring, very remotely) - they're used to create files.
 
rex hindlekar
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right Ulf.

Unless she uses the ready available files that are on the file system (local/remote machine)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic