Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How parse XML in PLSQL or java and generate dynamic SQL from it

Re: How parse XML in PLSQL or java and generate dynamic SQL from it

From: Ksprasadreddy <ksprasadreddy_at_yahoo.com>
Date: 17 Sep 2003 08:05:15 -0700
Message-ID: <734701da.0309170705.68b54835@posting.google.com>


Thanks for responding to my questions. I don't find any help except oracle documentation.
Thanks
-Symaprasad

Rauf Sarwar <rs_arwar_at_hotmail.com> wrote in message news:<3365466.1063414483_at_dbforums.com>...
> Originally posted by Ksprasadreddy
>
> > There is not much help from Oracle Documents and very few samples
>
> > available to do this, please help me.
>
> > This is what I am planning to achieve. I have input data in Xml
>
> > document consists of data for multiple tables. I want write stored
>
> > procedure take this Xml and generate dynamic SQL multiple inserts
>
> > statements.
>
> > Sample XML is as follows.
>
> > <IMPORT method="add">
>
> > <ROW NO="1">
>
> > <TABLE>TABLE1</TABLE>
>
> > <COL><UIDBILLHISTORY>10</UIDBILLHISTORY><UIDACCOUNT>10</UIDACCOUN-
> > T></COL>
>
> > </ROW>
>
> > <ROW NO="2">
>
> > <TABLE>TABLE2</TABLE><COL><UIDCUSTOMER>12</UIDCUSTOMER><UIDACCOUNT>10-
> > </UIDACCOUNT></COL>
>
> > </ROW>
>
> > <ROW NO="2">
>
> > <TABLE>TABLE3</TABLE><COL><UIDACCTHIST>277</UIDCUSTOMER><UIDACCOUNT>1-
> > 0</UIDACCOUNT></COL>
>
> > </ROW>
>
> > </IMPORT>
>
> >
>
> > I want get the out put something like this.
>
> > Insert into TABLE1 (UIDBILLHISTORY, UIDACCOUNT) values (10.100);
>
> > Insert into TABLE2 (UIDCUSTOMER, UIDACCOUNT) values (10.100);
>
> > Insert into TABLE3 (UIDACCTHIST, UIDACCOUNT) values (10.100);
>
> >
>
> >
>
> > Thanks in advance
>
> > --Syamprasad
>
>
>
>
>
> Go to http://tahiti.oracle.com and look up Oracle supplied packages like
> dbms_xmlxxx. I believe there is a package called dbms_xmlparser which
> may be what you are looking for.
>
>
>
> Regards
>
> /Rauf Sarwar
Received on Wed Sep 17 2003 - 10:05:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US