I have an XML string from a web service, that might be lacking some child nodes.
Before parsing the XML, i want to check if all the nodes are there and correct.
Example:
<fields>
<field RandomAttribute="True"> //these attributes should not make a difference
<name>Test1</name>
<type>Text</type>
<id>123</id>
</field>
<field>
<name>Test2</name> //THIS field node lacks the "type" child node
<id>114</id>
</field>
</fields>
What is the best way, to take the whole XML, and check whether all the nodes comply to a predefined xml schema/structure?
Notice that I added a RandomAttribute to the first FIELD node, which shouldn't have any effect on the functionality.