Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading xml to database

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

Can we upload xml to database using jdbc? if so, how do we do that? can anyone explain by giving sample code or example.

thanks in advance...
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Smita,

Can you tell us how you want to store the xml in the database, and what you want to do with that data later?
Please show us what you have already tried.

Regards, Jan
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How large is the XML data? What is the maximum size of a string that can be stored in your database? If the latter is greater than the former, you can store the XML in a string column. Otherwise use a CLOB.
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not directly without some form of transformation. It's a bit like apples and oranges when comparing XML and database data. You need an application to map one to the other else you may have a lot of denormalized data.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic