Oh, if you know the structure of the file and just want to read attributes in that fashion, you can easily do that with XPath.
Sample:
XPath has a lot more advanced features as well, but this is a simple example.Code:XPathDocument d = new XPathDocument("people.xml"); XPathNavigator root = d.CreateNavigator(); XPathNodeIterator listIter = root.Select("/people/location/list"); while (listIter.MoveNext()) { string name = listIter.Current.Evaluate("string(@name)") as string; string surname = listIter.Current.Evaluate("string(@surname)") as string; string location = listIter.Current.Evaluate("string(@location)") as string; string dwelling = listIter.Current.Evaluate("string(@dwelling)") as string; }