I want to check if every <Part> element has corresponding <Description> in this sample XML.
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
<Part>xxxxxx</Part>
</Item>
<Description>aaaaa bbbbbbbbbbbb</Description>
</Inv>
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
<Part>xxxxxx</Part>
</Item>
</Inv>
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
<Part>xxxxxx</Part>
</Item>
<Description>aaaaa bbbbbbbbbbbb</Description>
</Inv>
....<Lot Of XML>
This example should fail, since second <Part> does not have corresponding <Description>. I can count total <part> elements and total <Description> elements but does not feel that its the right way to do it.
Parsing using xml tools is not an option.