How to save sections of a single XML Document to multiple tables ?

Firstly, I apologise for the long e-mail but I feel it's necessary in order to clarify my problem/question.
The XML document representation below stores information about a particular database. From the information in the XML document you can tell that there is a single database called "tst" which contains a single table called "tst_table". This table in turn has two columns called "CompanyName" & "Country".
I want to use Oracle's XML SQL Utility to store this information into three seperate database tables. Specifically, I want to store the information pertaining to the database (i.e. name etc.) in one table, the information pertaining to the table (name, no. of columns etc.) in another and the information pertaining to the columns (name, type etc.) in yet another table.
I have seen samples where an entire XML Document is saved to a database table but I cannot find any examples where different sections of a single XML Document are saved into different database tables using the XML SQL Utility.
Can you please tell me the best approach to take in order to accomplish this . Does it involve creating an XMLDocument and then extracting the relevant sections as XMLDocumentFragment's, retrieving the String representations of these XMLDocumentFragment's and passing these strings to the OracleXMLSave.insertXml() method.
Is this the best approach to take or are there any other, perhaps more efficient or elegant, ways of doing this ?
Thanks in advance for your help
- Garry
<DATABASE id="1" name="tst">
<TABLES>
<TABLE name="tst_table">
<NAME>Customers</NAME>
<COLUMNS>
<COLUMN num="1"> <COLID>2</COLID>
<COLNAME>CompanyName</COLNAME>
<COLTYPE>Text</COLTYPE>
</COLUMN>
<COLUMN num="2">
<COLID>3</COLID>
<COLNAME>Country</COLNAME>
<COLTYPE>Text</COLTYPE>
</COLUMN>
</COLUMNS>
</TABLE>
</TABLES>
</DATABASE>
null

See this thread;
{thread:id=2180799}
Jeff

Similar Messages

  • How to Save Section to be a dxf document? why Save Section View button is not on?

    dear ..
    i use adobe Reader xi version 11.0.0 , when i want to use Save Section View button , i fine this button is not on? 
    my question is :
                             how to Save Section to be a dxf document? why Save Section View button is not on?
    hope to hear your reply !thanks!
    best regards!
    charles
    e-mail: [removed]

    Hi Sandesh,
    Please provide the complete code from print & save button.
    Thanks & Regards,
    Balamurugan G

  • XML document into multiple tables

    How to insert a xml document into multiple tables. Eg. Purchase Order having multiple line items. I have to insert xml document into Parent as well as child with different sets of columns.

    I created the tables using the create_ch14_tables.sql. I call it using java -classpath .;C:\commerceone\xpc\lib\xmlparserv2.jar;C:\commerceone\xpc\lib\classes12.zip;C:\commerceone\xpc\lib\xsu12.jar XMLLoader -file deptempdepend.xml -connName default -transform deptempdepend.xsl. The code doesn't seem to like the "<xsl:for-each select="Department">" tags. If I remove them, the insDoc.getDocumentElement().getFirstChild() will find the element, but it still doesn't insert anything into the database.
    Thank You,
    Dave

  • Create single XML document from multiple queries

    hi all!
    being a new programmer in XML world,my question might sound a bit stupid but your answers would mean a world to me. i have to generate a single XML document from my database by querying more than one table. for example i have 3 tables i.e HR_EMP_NAME, HR_PRODUCTS_DETAIL, HR_PAYROLL_SUMMARY. all three tables have completely different columns except one ID column which is a foreign kay from HR_MASTER_LIST. i want to get any insert operation on these tables as a single document. so far as i have studied, one option is to generate XMLDoc using XSU and then add child nodes using JAXP but i am ot geting the logic right.
    please do reply.
    thanks a lot
    usman

    This is an SQL/XML based answer so how much it helps you is hard to say, but it would be one option. You can have the SQL statement build the XML for you as shown by this simple example.
    SELECT XMLElement("root",
              XMLForest(emp.dummy AS "emp_name",
                        prod.dummy AS "prod_lvl",
                        pay.dummy AS "pay_scale"))
      FROM dual emp,
           dual prod,
           dual pay
    WHERE emp.dummy = prod.dummy
      AND emp.dummy = pay.dummy;which produces (formatted for human readability)
    <root>
      <emp_name>X</emp_name>
      <prod_lvl>X</prod_lvl>
      <pay_scale>X</pay_scale>
    </root>Whether that works with what you are trying to do via Java you will have to decide.

  • HOW TEXT CAN BE MADE SUBSCRIPTED IN XML DOCUMENT?

    SIR,
    I WANT TO DISPLAY MATHEMATICAL FORMULAS,WHICH INCLUDE MATHAMATICAL NOTATIONS LIKE "SIGMA" "DELTA" AND SO ON, AND ALSO SYMBOLS WITH SUBSCRIPTED TEXTS OR LETTERS,IN XML DOCUMENT.
    MY PROBLEM IS HOW CAN WE RENDER SUBSCRIPTED TEXTS IN XML DOCUMENT.
    FOR Eg.CONSIDER THE FORMULA SHOWN BELOW,IN HTML FORMAT.
    ÓAli * Bli / Cli
    PLEASE,TELL HOW THIS CAN BE REPRESENTED IN XML DOCUMENT.
    AND ALSO TELL ME HOW CAN A HORIZONTAL RULE BE DRAWN IN XML DOCUMENT
    THANK YOU.

    Ouch. Would you please not type in all capitals. It's hard to read.
    Anyway the question doesn't make sense. XML is just a format for storing and transmitting data. XML doesn't have the concepts of subscripting and drawing horizontal rules. Perhaps you were thinking of HTML?

  • Transforming single XML doc to Multiple XML docs

    I have a XML file with the structure shown below stored in the system.
    For now, I am just showing the empty elements for now -
    <DEPT>
    <ID>
    <NAME>
    <EMPLOYEE>
    <FIRST_NAME>
    <LAST_NAME>
    <PROJECT>
    <PROJ_NAME>
    <PROJ_ID>
    </PROJECT>
    <PROJECT>
    <PROJ_NAME>
    <PROJ_NAME>
    </PROJECT>
    <ADDRESS>
    <STREET>
    <CITY>
    </ADDRESS>
    <EMPLOYEE>
    </DEPT>
    I wish to load this file into multiple Oracle 8i database tables like DEPT,EMPLOYEE, PROJECT, ADDRESS
    which are master details, using XSU PLSQL API.
    My Problems/doubts are:
    1. I tried creating Object views but because of limitation of creating repeating collections
    in Oracle 8i I can not use that. It works only for one level of repetition.
    So I found out that it can be done by breaking xml to multiple xml documents.
    How can I convert this xml into multiple xml documents so that I can insert into different tables. Please provide your guidance and sample code for xslt file if possible.
    2. If I use XSLT how can I apply XSLT to external XML document that I am receiving (I cannot modify it).
    I found example of this using ORAXSL command line utility. But I wish to know if it's possible
    to appy XSLT within PLSQL procedure. If not, is ORAXSL only the way to do it.
    Thanks for the help. If possible pls provide Sample code
    Thanks

    Please refer to Steve Muench's book: Building Oracle XML Applications. It has good example for your case.
    Inside database, you can use xslprocessor PL/SQL package for XSLT transformation

  • To load an XML document into 40 tables

    How do I load a large XML document into 40 tables. Most of the exmaples, I see only load one table into the Orcale database?

    From the above document:
    Storing XML Data Across Tables
    Question
    Can XML- SQL Utility store XML data across tables?
    Answer
    Currently XML-SQL Utility (XSU) can only store to a single table. It maps a canonical representation of an XML document into any table/view. But of course there is a way to store XML with the XSU across table. One can do this using XSLT to transform any document into multiple documents and insert them separately. Another way is to define views over multiple tables (object views if needed) and then do the inserts ... into the view. If the view is inherently non-updatable (because of complex joins, ...), then one can use INSTEAD-OF triggers over the views to do the inserts.
    -- I've tried this, works fine.

  • Query performance - A single large document VS multiple small documents

    Hi all,
    What are the performance trade offs when using a single large document VS multiple small documents ?
    I want to store xml snippets with similar structure in a container. Is there any benefit while querying, if I use a single large document to store all these snippets against adding each snippet as a different document. Would it degrade the performance when adding an xml snippet each time by modifying an existing document?
    How could we decide whether to use a single large document VS multiple small documents?
    Thanks,
    Anoop

    Hello Anoop,
    In case you wanted to get a comparison between the storage types for containers, wholedoc and node, let us know.
    What are the performance trade offs when using a
    single large document VS multiple small documents ?Depends on what is more important to you, performance when creating the container, and inserting the document(s) or performance when retrieving data.
    For querying the best option is to go with smaller documents, as node indexes would help in improving query performance.
    For inserting initial data, you can construct your large document composed of smaller xml snippets and insert the document as a whole.
    If you further want to modify this document changing its structure implies performance penalties; more indicated is to store the xml snippets as documents.
    Overall, I see no point in using a large document that will hold all of your xml snippets, so I strongly recommend going with multiple smaller documents.
    Regards,
    Andrei Costache
    Oracle Support Services

  • Single billing document for multiple delivery documents

    Hi,
    Can someone tell me how to configure or proceed to make single billing document for multiple delivery documents.
    Document flow: Contract--> Order---> Delivery----> Billing
    -Thanks

    Being an old member of the forum, there is no need to stress the importance of adhering to forum rules where it has been clearly spelled out to avoid posting repeated queries.
    If you search the forum or Google it, you will find lot of documentations available on the same topic.  Take the inputs and try on your own.  Still if you face any issue, update here.
    G. Lakshmipathi

  • Can we use single DB Adapter for multiple tables

    Hi,
    I have 3 tables. ONE is the Master table and other 2 tables having Primary and foreign key relationships with the Master Table.
    Data is enter in the Tables 2 & 3 (based on Master Table Primary key)
    I have to use a DB Adapter in BPEL Process which will be in Transaction (what type of Transaction is Best in such a Scenario).
    - How do i implement it in BPEL.
    - Can i use a Single DB Adapter for Multiple Tables ? (*Views* should not be created for tables 1, 2 & 3),
    as we want to avoid using multiple DB Adapters, as in future Tables may increase or decrease...
    - while in Transaction if Table 2 fails in Inserting / Updating, it should roll back on error and also if Table 3 fails in Inserting / Updating, it should roll back table 2 and Table 3.
    - how access to concurrent users is maintained / managed in such a scenarios.
    But everything should be done using Single DB Adapter without creating a separate view.
    Is this Possible in BPEL..
    If not, How do we design, Implementation such a BPEL Process in Transaction with a best in Performance (both BPEL Process & DB Resources)
    thanks in advance
    thanks & regards,
    anvv sharma

    Hi,
    Thanks for your quick response.
    I have few quires.
    If we use PL/SQL, how do we implement transaction and Exception Handling appropriately based on the Error / Exception in BPEL.
    If the Table 2 or Table 3 gives out Error / Exception, i have to handle it separately and intimate accordingly.
    Suppose, if Table 2 got Error / Exception - Error Handling would be 'Roll back due to error in Table2'
    Thanks & regads,

  • Single result set across multiple tables

    Hi - what's the best way to perform a single query that can pull
    a single result set across multiple tables, ie., a master table
    containing subject details and child table containing multiple
    records with detail.
    I know how to do this for two columns in the same table via
    indexing, but how about across tables?
    Cheers,
    John

    I am not sure if I understood your question, but you can use
    Intermedia Text with USER_DATA_STORE to create an index with data
    source from multiple tables.
    (see technet.oracle.com -> products -> oracle text)
    Thomas

  • Xml document to oracle tables - data is not fatching

    Hello,
    I am new to xml and trying to extract some fields from xml document to oracle tables to use them further in application. I have written following to extract values but nothing is fatching from document:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <dmsgo:DMS_GO_Interface xmlns:dmsgo="https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1 DMS_GO_Interface_v1.xsd">
    <dmsgo:majorversion>1</dmsgo:majorversion>
    <dmsgo:identity context="CONFGOFR_OUT" datetimecreated="01/03/2011 10:51" source="go" sourceversion="1.410.1" />
    - <dmsgo:prospect>
    <dmsgo:requestresponse code="0" />
    <dmsgo:references />
    - <dmsgo:configurationcontext dataversion="2163" languageiso="en" orderingmarket="867" saleslevel="R">
    <dmsgo:configurationdate>01/03/2011</dmsgo:configurationdate>
    </dmsgo:configurationcontext>
    - <dmsgo:vehicle>
    <dmsgo:variant baumuster="2120482" manufacturercode="2120482" />
    <dmsgo:desc>E 200 CGI BlueEFFICIENCY Sedan RHD</dmsgo:desc>
    - <dmsgo:colorcombination>
    <dmsgo:interiorcolor codeowner="C" manufacturercode="4201" ppmtype="AU">Leather black</dmsgo:interiorcolor>
    <dmsgo:exteriorcolor codeowner="C" manufacturercode="2497" ppmtype="LU">Cuprite brown metallic</dmsgo:exteriorcolor>
    <dmsgo:paintzone manufacturercode="" preference="2" />
    </dmsgo:colorcombination>
    INSERT INTO p1 (flux_name, elment_1, elment_2, elment_3)
    SELECT flux_name, elment_1, elment_2, elment_3
    FROM XMLTable(
    XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as "dmsgo"),
    'dmsgo:DMS_GO_Interface/prospect/vehicle'
    passing xmltype(bfilename('DMLDIR','prospect.xml'), nls_charset_id('CHAR_CS'))
    columns
    flux_name varchar2(20) path 'dmsgo:variant/@baumuster',
    elment_1 varchar2(20) path 'dmsgo:desc',
    elment_2 varchar2(20) path 'dmsgo:colorcombination/interiorcolor',
    elment_3 varchar2(20) path 'dmsgo:colorcombination/interiorcolor/@manufacturercode'
    Please help.
    Looking forward to early response.
    Thanks
    Usman

    Hi,
    You're missing the namespace prefix on some elements.
    This should work :
    SQL> SELECT flux_name, elment_1, elment_2, elment_3
      2  FROM XMLTable(
      3    XMLNamespaces ('https://globalordering.daimler.com/start/dms/interface/DMS_GO_Interface/v1' as "dmsgo"),
      4    'dmsgo:DMS_GO_Interface/dmsgo:prospect/dmsgo:vehicle'
      5    passing xmltype(bfilename('DMLDIR','prospect.xml'), nls_charset_id('CHAR_CS'))
      6    columns
      7      flux_name varchar2(20) path 'dmsgo:variant/@baumuster',
      8      elment_1  varchar2(40) path 'dmsgo:desc',
      9      elment_2  varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor',
    10      elment_3  varchar2(20) path 'dmsgo:colorcombination/dmsgo:interiorcolor/@manufacturercode'
    11  );
    FLUX_NAME            ELMENT_1                                 ELMENT_2             ELMENT_3
    2120482              E 200 CGI BlueEFFICIENCY Sedan RHD       Leather black        4201

  • Can I Save a Single .AI Document As Multiple Files, Seperated by the Page Tiling?

    There must be a way to save or output a single Adobe Illustrator file  into multiple files based on the "pages" I have created in the  document?
    For example, if I have tiled 10 tabloid-sized  pages onto a single Illustrator CS3 .AI file, is it possible to save  the file in a manner that will allow all of those tiled pages to be  saved as a seperated or individual files?
    I guess it  would be a similar concept to how in newer versions (like CS4) you can  export multiple jpegs of an illustrator file that contains several  artboards and it automatically assigns a number suffix to the filename  since multiple files were outputted from the single ai file.
    Any  help is MUCH appreciated. Thanks!

    Please post your question in the Illustrator forum. This forum is for suite specific issues only.
    Bob

  • Including multiple XSU queries in a single XML document

    Can anyone set me on the right path to using Oracle's DOM parser to include the XML reulsts of multiple XSU queries into a single document? I can successfully return the queries with "Document doc = xquery1.getXMLDOM();" but cannot figure out how to add all of the children of these Documents to a master XMLDocument object.
    Thanks very much,
    Cristian

    Hi,
    Batching is not supported for custom document. You need to enqueue your message one by one into B2B. If you want to batch them together, you will need to write a script to concat them together after the messages have been translated into native EANCOM format.
    Eng

  • How to delete a node in an XML document

    Hi,
    My flex plugin loads an XML document that is passed in from
    the ExternalInterace. I have a List control that displays data from
    this XML document.
    The XML looks like:
    <document>
    <response>
    <objectlist>
    <list type="typeValue">
    <object type="typeValue" name="Name Value" id="GUID
    Value1">
    <params>
    <params>
    </object>
    <!-- more objects in this list -->
    </list>
    </objectlist>
    </response>
    </document>
    I set the list dataProvider to
    xmlDoc.response.objectlist.list.object
    Thing is, I want to remove one of the object nodes before I
    display the data (that is, i dont want one of the nodes in the XML
    document to appear in the list).
    How do I do this? I could not find any way to delete an
    existing node in the XML api.
    -Gaurav

    You can either use the "delete" operator:
    delete xmlDoc.response.objectlist.list.object[5]
    where the object to be deleted might be the fifth down
    (you'll have to play with your xml in debug to get the actual
    values down) or convert to xmlListCollection. The xmlListCollection
    provides easy methods to remove the offending nodes or you may
    provide a filterFunction for the collection which will "hide" the
    node.

Maybe you are looking for

  • Dtlogin with Openldap 2.3.20

    Hi, recently after many problems I have stopped my tests to implement Openldap 2.3.20 with Padl libraries. I started to setup Openldap with native libraries following instructions from a kind friend and from Gary Tay homepage. I use for the moment th

  • Print multiple photos on one sheet in Photoshop Elements 11

    I want to print multiple photos on one sheet in Photoshop Elements 11 I am using Mac OS10 10.7.5  I am using Photo shop Elements 11.  Could you please help me?  New to photoshop elements.  Thanks.  Jodie

  • [svn:osmf:] 14372: PARB changes: Remove metadata from MediaContainer and LayoutTargetSprite constructors.

    Revision: 14372 Revision: 14372 Author:   [email protected] Date:     2010-02-23 15:17:18 -0800 (Tue, 23 Feb 2010) Log Message: PARB changes: Remove metadata from MediaContainer and LayoutTargetSprite constructors.  Instead, metadata is set on Layout

  • My dock has been acting strange lately.

    Whenever I open an application that isn't permanently on my dock, it doesn't appear on the dock and when I open an application that is permanently on my dock, such as Safari, the blue indicator light doesn't turn on and if I want to quit the applicat

  • To connect to several servers

    Hi, I must make an application that calculates the number pi. Points will be created at random and will use the circle unit. The user will say to the client the number to him of points that wishes to generate. So, the client t will receive that numbe