I have an XML document of the form:
<metadata>
<item name="Name" type="xs:string" length="102"/>
<item name="Email" type="xs:string" length="202"/>
</metadata>
<data>
<row>
<value>Daniel</value>
<value>[email protected]</value>
</row>
<row>
<value>George</value>
<value>[email protected]</value>
</row>
</data>
The ordering and number of columns may change so it is not sufficient to assume //row/value[1]/text() always holds 'Name'.
What is the best way to query the document using the metadata names to pull the right values?
I am querying the document in C#.NET3.5 so can use XDocument, XPath etc... whichever is the best for the job.