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.
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.