Friday, 22 August 2014

Pulling first values from xml file in c#



I have an xml file that starts with:



<SAMPLEPROFILE
Name="File Name"
Number="2"
>


I am trying to pull out the Number.


Here is what I am trying:



string number = _myXml.GetElementsByTagName("SAMPLEPROFILE").Item(1).Value;


When debugging I can see the xml file by hovering over _myXml, but I cannot see the number property?


No comments:

Post a Comment