1.replace all the TAGs.
ex) as you may know >> sed -e "s/<Data>/--<Data>/" aaa.txt > aaa.out
replace <Data> -> --<Data>
replace </Data> -> --</Data>
replace <Employee> -> --<Employee>
replace </Employee> -> --</Employee>
replace <EmpName> -> INSERT INTO EMPLOYEE(EmpName, EmpID) VALUES( '
replace </EmpName> -> '
replace <EmpID> -> ,
replace </EmpID> -> );
2.execute generated output file.
output file will be like this,
--<Data>
--<Employee>
INSERT INTO EMPLOYEE(EmpName, EmpID) VALUES( 'Kiran'
,100);
--</Employee>
Cheers,
Christine.
================================================== ==============
ra**************@yahoo.com (Kiran Dalvi) wrote in message news:<b3*************************@posting.google.c om>...
Hi,
I have following problem scenario .....
I have a XML of the format ....
<Data>
<Employee>
<EmpName>Kiran</EmpName>
<EmpID>100</EmpID>
</Employee>
<Employee>
<EmpName>Faheem</EmpName>
<EmpID>1000</EmpID>
</Employee>
..
..
.. ..... I have such 30000+ blocks corressponding to 30000+
Employees.
</Data>
Now, I have a DB design with following columns .....
1) EmpName Varchar2(64)
2) EmpID Number(64)
Here I want to parse this XML and persist the data from that XML into
DB "efficiently".
I don't want to use conventional INSERTs.
How can I go about it ?
Thanks,
--Kiran