I have following xml file. I want to parse it without Serilization in C#.
<StudentList>
<StudentCount>5</StudentCount>
<Student>
<Id>1</Id>
<Name>Abc</Name>
</Student>
<Student>
<Id>2</Id>
<Name>Efg</Name>
</Student>
<Student>
<Id>3</Id>
<Name>Ghi</Name>
</Student>
<Student>
<Id>4</Id>
<Name>Jkl</Name>
</Student>
<Student>
<Id>5</Id>
<Name>Mno</Name>
</Student>
</StudentList>
I want to store above xml data in List of Student class
List<Student>
Class Student
{
public int Id = 0;
public string Name = "";
}
Here i also want a Xpath of each value node For Ex :
StudentList\StudentCount
StudentList\Student\Id
StudentList\Student\Name
Please help me How do i achieve this???