Akhil Madivada

Akhil Madivada

  • NA
  • 58
  • 7.6k

To create package in ssis for xml file and parse it and get

May 19 2017 10:30 PM
I am working on SSIS, my question is I want to write a SSIS package to parse XML file and the output should store in the database.what I did in the image 1 and in this package, I haven't written any code for parsing and in the output I am getting  g only the header values from XML file but I need to read the data which is the each header too.actual output should be like:metername ,serial number,meterreadingid,medaitype,installdate and i am attaching the xml file can anyone help me on this please,
 
 
XML FILE IS HERE: 
-<AMRDEF CreationTime="2013-08-09 00:18:42" version="7.0" Purpose="AMRDataRequest">
-<MeterReadings Purpose="OnRequestRead" CollectionTime="2013-08-09 19:57:11" Initiator="OnRequest" SourceIrn="30" SourceName="coll_0591_stuart" Source="Remote" Irn="21">
<Meter MediaType="900 MHz" ObservesDaylightSavings="true" TimeZoneOffset="300" Timezone="(GMT-05:00) Eastern Time (US & Canada)" TimeZoneIndex="11" Location="" SdpIdent="" AccountName="" AccountIdent="" RemovalDate="" InstallDate="2013-05-01 20:28:09" Description="" MeterType="REX" SerialNumber="03310266" IsActive="true" MeterName="03310266" MeterIrn="21"/>
+<ConsumptionData>
-<ConsumptionData>
<ConsumptionSpec Multiplier="1" MeasurementPeriod="EndOfIntervalSnapshot" TouBucket="Total" Direction="Received" UOM="kWh"/>
<Reading Value="0" TimeStamp="2013-08-09 00:00:00"/>
</ConsumptionData>
-<LoadProfileSummary>
<Channel Multiplier="0.1" Direction="Delivered" UOM="kWh" SumOfIntervalValues="155316.3" ReadingRangeEndTimestamp="2013-08-09 00:00:00" ReadingRangeStartTimestamp="2013-08-02 00:00:00" FirstIntervalTimestamp="2013-08-02 00:15:00" NumIntervalsRead="675" IntervalSeconds="900"/>
<Channel Multiplier="0.1" Direction="Received" UOM="kWh" SumOfIntervalValues="0" ReadingRangeEndTimestamp="2013-08-09 00:00:00" ReadingRangeStartTimestamp="2013-08-02 00:00:00" FirstIntervalTimestamp="2013-08-02 00:15:00" NumIntervalsRead="675" IntervalSeconds="900"/>
</LoadProfileSummary>
+<IntervalData>
-<IntervalData>
<IntervalSpec Multiplier="0.1" Direction="Received" UOM="kWh" TimestampEnd="2013-08-09 00:00:00" TimestampStart="2013-08-02 00:15:00" Channel="2" Interval="15"/>
<Reading TimeStamp="2013-08-02 00:15:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 00:30:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 00:45:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:00:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:15:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:30:00" RawReading="0"/>
<Reading TimeStamp="2013-08-02 01:45:00" RawReading="0"/>