• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

XML To DataBase

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was trying to insert XML file into a database table in which one of the fields is of type 'number' using Oracle XSU12 utility.
But oracleXMLSave.insertXML() throws an OracleXMLSQLException saying that invalid number. Please let me know if there is any way to rectify this problem.
 
ShivaPrasad Devaki
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this problem resolved. Thanks...
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, if you have a moment, let us know what you did to solve your problem. That way, anyone else witha similar problem can just look here and get the answer. Thanks.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it would be of great help if you could share your experience
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

yes, please show how u resolved it if u have time
 
ShivaPrasad Devaki
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It was just that new line characters were getting inserted in XML strings, where numbers are expected. Oracle XSU utility does not ignore control characters in the element value part when it is trying to store xml in database. Also it makes sense to do that.
That way I just modified the program which is generating XML files for me. It just worked fine.
I would take this opportunity to let you know about my current project where I am using XML.
We have a product called ePIT Core engine which can be used as online exchange B2B software. During the exchange life cycle we are supposed to capture business events as a part of journaling and store this data in a persistent storage.
For implementing this functionality I am using XML data structure to represent the data which is captured in the market operations. Also same structure has been followed in relational database schema for persistence storage. We are using Oracle 8i as Database. I am using Oracle XSQL utility for mapping xml files to the database. Since my database schema is relational, we have two ways of doing this.
1. Create object views for the relational database schema and map xml files to those object views.
( I have not tried this option ....but it should not be very difficult )
2. Reformat your xml which is an identical mapping to your database tables and store it directly using XSQL interface.
Currently I am following this methodology. It just works fine. But it all depends upon the complexity of your database schema and xml structure.
If you don't want to use Oracle XSQL utility then you can go for other solutions like XDBMS.
Hoping that this information might help all of us to share our realtime experiences in XML.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that's interesting.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!