Info from unknown XML
Posted: Mon Sep 10, 2018 3:50 am
Hi,
I'm trying to solve an issue where I receive XML similar to the below. It could have any number of sections and I'm looking for a number for how many sections there are. This example has 8.
Along with that, I'm looking for the Quantity value for each of the sections.
Any tips or example scripts of how to pull the info, greatly appreciated, thanks
I'm trying to solve an issue where I receive XML similar to the below. It could have any number of sections and I'm looking for a number for how many sections there are. This example has 8.
Along with that, I'm looking for the Quantity value for each of the sections.
Code: Select all
<Kinds>
<Kind>
<Key>27747</Key>
<QQDSKey>0</QQDSKey>
<Name>A</Name>
<Quantity>6</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27748</Key>
<QQDSKey>0</QQDSKey>
<Name>B</Name>
<Quantity>14</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27749</Key>
<QQDSKey>0</QQDSKey>
<Name>C</Name>
<Quantity>7</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27750</Key>
<QQDSKey>0</QQDSKey>
<Name>D</Name>
<Quantity>13</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27751</Key>
<QQDSKey>0</QQDSKey>
<Name>E</Name>
<Quantity>8</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27752</Key>
<QQDSKey>0</QQDSKey>
<Name>F</Name>
<Quantity>12</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27753</Key>
<QQDSKey>0</QQDSKey>
<Name>G</Name>
<Quantity>9</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
<Kind>
<Key>27754</Key>
<QQDSKey>0</QQDSKey>
<Name>H</Name>
<Quantity>11</Quantity>
<IsCondensed>True</IsCondensed>
<KindSections>
<KindSection>
<Name>Single-Section</Name>
</KindSection>
</KindSections>
</Kind>
</Kinds>