I need to parse this XML File:
<SystemConfiguration Model="PowerEdge R740xd" ServiceTag="Test" TimeStamp="Wed Feb 14">
<Component FQDD="iDRAC.Embedded.1">
<Attribute Name="Info.1#Product">Integrated Dell Remote Access Controller</Attribute>
<Attribute Name="IPMILan.1#Enable">Disabled</Attribute>
<Attribute Name="IPMILan.1#PrivLimit">Administrator</Attribute>
<Attribute Name="IPMILan.1#EncryptionKey">0</Attribute>
<!-- <Attribute Name="AutoBackup.1#IPAddress"></Attribute> -->
<!-- <Attribute Name="AutoBackup.1#Domain"></Attribute> -->
</Component>
<Component FQDD="RAID.Integrated.1-1">
<Attribute Name="RAIDresetConfig">True</Attribute>
<Attribute Name="RAIDforeignConfig">Clear</Attribute>
<Attribute Name="RAIDrekey">False</Attribute>
<Attribute Name="EncryptionMode">None</Attribute>
<Component FQDD="Disk.Virtual.8:RAID.Integrated.1-1">
<Attribute Name="RAIDaction">Create</Attribute>
<Attribute Name="LockStatus">Unlocked</Attribute>
<Attribute Name="RAIDinitOperation">None</Attribute>
<Attribute Name="DiskCachePolicy">Default</Attribute>
<Attribute Name="RAIDdefaultWritePolicy">WriteBack</Attribute>
<Attribute Name="RAIDdefaultReadPolicy">ReadAhead</Attribute>
<Attribute Name="Name">Virtual Disk 8</Attribute>
<Attribute Name="Size">0</Attribute>
<Attribute Name="StripeSize">0</Attribute>
<Attribute Name="SpanDepth">1</Attribute>
<Attribute Name="SpanLength">1</Attribute>
<Attribute Name="RAIDTypes">RAID 0</Attribute>
<Attribute Name="IncludedPhysicalDiskID">Disk.Bay.7:Enclosure.Internal.0-1:RAID.Integrated.1-1</Attribute>
</Component>
<Component FQDD="Disk.Virtual.9:RAID.Integrated.1-1">
<Attribute Name="RAIDaction">Create</Attribute>
<Attribute Name="LockStatus">Unlocked</Attribute>
<Attribute Name="RAIDinitOperation">None</Attribute>
<Attribute Name="DiskCachePolicy">Default</Attribute>
<Attribute Name="RAIDdefaultWritePolicy">WriteBack</Attribute>
<Attribute Name="RAIDdefaultReadPolicy">ReadAhead</Attribute>
<Attribute Name="Name">Virtual Disk 9</Attribute>
<Attribute Name="Size">0</Attribute>
<Attribute Name="StripeSize">0</Attribute>
<Attribute Name="SpanDepth">1</Attribute>
<Attribute Name="SpanLength">1</Attribute>
<Attribute Name="RAIDTypes">RAID 0</Attribute>
<Attribute Name="IncludedPhysicalDiskID">Disk.Bay.6:Enclosure.Internal.0-1:RAID.Integrated.1-1</Attribute>
</Component>
<Component FQDD="Enclosure.Internal.0-1:RAID.Integrated.1-1">
<Component FQDD="Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1">
<Attribute Name="RAIDHotSpareStatus">No</Attribute>
<Attribute Name="RAIDPDState">Ready</Attribute>
</Component>
<Component FQDD="Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1">
<Attribute Name="RAIDHotSpareStatus">No</Attribute>
<Attribute Name="RAIDPDState">Ready</Attribute>
</Component>
</Component>
<Attribute Name="RAIDremoveControllerKey">False</Attribute>
</Component>
</SystemConfiguration>
The goal is to get the data into key value pairs into the following columns:
Model | ServiceTag | TimeStamp | Component | Attribute | Value
Is it possible for me to do that with its current format? I know there are multiple components, what I would like to do is concatenate any of the components where it needs it.
This data is brought in from an XML file using SSIS. It bring the entire XML in on a string and then is parsed using a trigger.