I am working with sharePoint Lists webservice, in order to load a dropdown in search page I need to extract all the “ows_Country” name from XML, returend in XMLNode in the Format of :
<rs:data ItemCount="1" xmlns:rs="urn:schemas-microsoft-com:rowset">
<z:row ows_Title="Nike" ows_ID="1" ows_Country="Spain" xmlns:z="#RowsetSchema" />
<z:row ows_Title="Addidas" ows_ID="4" ows_Country="Brazil" xmlns:z="#RowsetSchema" />
<z:row ows_Title="Puma" ows_ID="5" ows_Country="Spain" xmlns:z="#RowsetSchema" />
</rs:data>
I need to use LINQ to get the distinct “ows_Country” from the XMLNode, Kindly help is probably my first experience with LINQ as well as XML.
1 Answer