Parsing XML file
Posted: Wed Mar 31, 2010 6:58 am
I have a XML file whose content I am trying to load into a table,I am not sure how to pull data from this XML file because I am not able to understand the metadata behind this XML.
I tried to Import this XML file into Import table defination section,XML as source and build a metadata which is then used in the XML imput stage.
Still,there are some issues with the design and Value coloumn is blank at all the places.I have pasted a sample XML file for the reference..
Anyone could please suggest me the way to read all data within the XML.
=================================================
<dumps Patcher="http://hoverif.comer:29081/d3p">
<dump time="Tue Mar 09 10:32:27 CST 2010">
<scom name="com.sepr:type=Metrics,service=monitorService">
<attributes>
<attribute name="Failed">
<value>
dd
</value>
</attribute>
<attribute name="Successful">
<value>
e0
</value>
</attribute>
<attribute name="Consolidated">
<value>
<composite>
<attribute name ="LastRes">
<value>
1084
</value>
</attribute>
<attribute name ="LastResponseUpdate">
<value>
Tue Mar 09 10:24:34 CST 2010
</value>
</attribute>
</composite>
</value>
</attribute>
<attribute name="Operational">
<value>
Available
</value>
</attribute>
<attribute name="NumberOfSuccessful">
<value>
0
</value>
</attribute>
<attribute name="LastResponse">
<value>
1084
</value>
</attribute>
<attribute name="TimeInThread">
<value>
10
</value>
</attribute>
<attribute name="ThreadQueueLength">
<value>
10
</value>
</attribute>
<attribute name="Health">
<value>
NotApplicable
</value>
</attribute>
</attributes>
</scom>
</dump>
</dumps>
=================================================
I tried to Import this XML file into Import table defination section,XML as source and build a metadata which is then used in the XML imput stage.
Still,there are some issues with the design and Value coloumn is blank at all the places.I have pasted a sample XML file for the reference..
Anyone could please suggest me the way to read all data within the XML.
=================================================
<dumps Patcher="http://hoverif.comer:29081/d3p">
<dump time="Tue Mar 09 10:32:27 CST 2010">
<scom name="com.sepr:type=Metrics,service=monitorService">
<attributes>
<attribute name="Failed">
<value>
dd
</value>
</attribute>
<attribute name="Successful">
<value>
e0
</value>
</attribute>
<attribute name="Consolidated">
<value>
<composite>
<attribute name ="LastRes">
<value>
1084
</value>
</attribute>
<attribute name ="LastResponseUpdate">
<value>
Tue Mar 09 10:24:34 CST 2010
</value>
</attribute>
</composite>
</value>
</attribute>
<attribute name="Operational">
<value>
Available
</value>
</attribute>
<attribute name="NumberOfSuccessful">
<value>
0
</value>
</attribute>
<attribute name="LastResponse">
<value>
1084
</value>
</attribute>
<attribute name="TimeInThread">
<value>
10
</value>
</attribute>
<attribute name="ThreadQueueLength">
<value>
10
</value>
</attribute>
<attribute name="Health">
<value>
NotApplicable
</value>
</attribute>
</attributes>
</scom>
</dump>
</dumps>
=================================================