I am trying to pull out some nested XML using C# and XMLReader.
Can't seem to extract the "Items" for each "Product" when i loop
through file, i can loop over the "Product" notes just fine but
everytime i perform a nested loop over the "Items" list i keep every
item on the file listed for each "Product".
Is there an easy approach to get the related Items for each Product ID
instead of all the Items everytime?
my xml file looks something like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<Products>
<Product>
<ProductID>12</ProductID>
<Items>
<Item>
<ItemID>1</ItemID>
<Part>Some Great Part</Part>
</Item>
<Item>
<ItemID>2</ItemID>
<Part>Extra Part</Part>
</Item>
</Items>
</Product>
<Product>
<ProductID>13</ProductID>
<Items>
<Item>
<ItemID>3</ItemID>
<Part>Missing Part</Part>
</Item>
</Items>
</Product>
</Products>
By the way i accidentally posted this question in the wrong group
earlier so i apologize in advance if anyone has tripped over already.
Thanks in for any guidance...