Hi,
I am new to the XML Input stream (STAX) component of Penthao.
My requirement is to read the XML data and dump the related data into a DB table.
Any help in this regard on dumping the data into a table will be helpful.
Not able to attach the sample file here, Hence pasting the sample_t.xml.
The requirement is...For a Particular TR (recordno-123) i need to load all the data into a DB table.
For the duplicates of Date and DIR i have filter condition where in i always get a single record and i will be able to load it.
The issue is with INST data where i have more than 2 records coming.
But my requirement is have a single record for a TR, if duplicates are coming then how to merge them into a single record?
<?xml version="1.0" encoding="UTF-8"?>
<TRXT>
<TR recordno="123" raderef="00000354" ver="1" origin="AAAA" trtype="ABC" >
<DATE datetype="DEF" date="2013-05-24" time="14:28:00" version="XXX" />
<DATE datetype="GHI" date="2013-06-12" time="12:24:00" version="XXX" />
<DATE datetype="JKL" date="2013-07-04" time="00:00:00" version="XXX" />
<DATE datetype="MNO" date="2013-08-06" time="00:00:00" version="XXX" />
<DRI dritype="ABCD" dricd="OPEN" />
<DRI dritype="EFGH" dricd="AE" />
<DRI dritype="IJKL" dricd="YES" />
<DRI dritype="MNOP" dricd="OK" />
<DRI dritype="QRST" dricd="YY" />
<INST instrtype="FGHY" piref="QQQ" insrefty="" insref="" lname="JOHN" qty="0.000" >
</INST>
<INST instrtype="AFRH" piref="WWW" insrefty="" insref="" lname="MY-COMPUTER" qty="0.000" >
</INST>
<INST instrtype="UHGI" piref="OOO" insrefty="" insref="" lname="TECHNO" qty="0.000" >
</INST>
<INST instrtype="ONEH" piref="MMM" insrefty="" insref="" lname="SYSTEM-P" qty="0.000" >
</INST>
<DATE datetype="DEF" date="2013-05-24" time="14:28:00" version="XXX" />
<DATE datetype="GHI" date="2013-06-12" time="12:24:00" version="XXX" />
<DATE datetype="JKL" date="2013-07-04" time="00:00:00" version="XXX" />
<DATE datetype="MNO" date="2013-08-06" time="00:00:00" version="XXX" />
<DRI dritype="JKLM" dricd="OPEN" />
<DRI dritype="NOPQ" dricd="AE" />
<INST instrtype="YUOI" piref="PPP" insrefty="" insref="" lname="ESTER" qty="0.000" >
</INST>
<INST instrtype="HJKL" piref="LLL" insrefty="" insref="" lname="NIKLAUS" qty="0.000" >
</INST>
</TR>
</TRXT>
I am new to the XML Input stream (STAX) component of Penthao.
My requirement is to read the XML data and dump the related data into a DB table.
Any help in this regard on dumping the data into a table will be helpful.
Not able to attach the sample file here, Hence pasting the sample_t.xml.
The requirement is...For a Particular TR (recordno-123) i need to load all the data into a DB table.
For the duplicates of Date and DIR i have filter condition where in i always get a single record and i will be able to load it.
The issue is with INST data where i have more than 2 records coming.
But my requirement is have a single record for a TR, if duplicates are coming then how to merge them into a single record?
<?xml version="1.0" encoding="UTF-8"?>
<TRXT>
<TR recordno="123" raderef="00000354" ver="1" origin="AAAA" trtype="ABC" >
<DATE datetype="DEF" date="2013-05-24" time="14:28:00" version="XXX" />
<DATE datetype="GHI" date="2013-06-12" time="12:24:00" version="XXX" />
<DATE datetype="JKL" date="2013-07-04" time="00:00:00" version="XXX" />
<DATE datetype="MNO" date="2013-08-06" time="00:00:00" version="XXX" />
<DRI dritype="ABCD" dricd="OPEN" />
<DRI dritype="EFGH" dricd="AE" />
<DRI dritype="IJKL" dricd="YES" />
<DRI dritype="MNOP" dricd="OK" />
<DRI dritype="QRST" dricd="YY" />
<INST instrtype="FGHY" piref="QQQ" insrefty="" insref="" lname="JOHN" qty="0.000" >
</INST>
<INST instrtype="AFRH" piref="WWW" insrefty="" insref="" lname="MY-COMPUTER" qty="0.000" >
</INST>
<INST instrtype="UHGI" piref="OOO" insrefty="" insref="" lname="TECHNO" qty="0.000" >
</INST>
<INST instrtype="ONEH" piref="MMM" insrefty="" insref="" lname="SYSTEM-P" qty="0.000" >
</INST>
<DATE datetype="DEF" date="2013-05-24" time="14:28:00" version="XXX" />
<DATE datetype="GHI" date="2013-06-12" time="12:24:00" version="XXX" />
<DATE datetype="JKL" date="2013-07-04" time="00:00:00" version="XXX" />
<DATE datetype="MNO" date="2013-08-06" time="00:00:00" version="XXX" />
<DRI dritype="JKLM" dricd="OPEN" />
<DRI dritype="NOPQ" dricd="AE" />
<INST instrtype="YUOI" piref="PPP" insrefty="" insref="" lname="ESTER" qty="0.000" >
</INST>
<INST instrtype="HJKL" piref="LLL" insrefty="" insref="" lname="NIKLAUS" qty="0.000" >
</INST>
</TR>
</TRXT>