Menu:

Select XML Nodes by Name [C#]

To find nodes in an XML file you can use XPath expressions.
Method XmlNode.Selec­tNodes returns a list of
nodes selected by the XPath string. Method XmlNode.Selec­tSingleNode finds the first
node that matches the XPath string.

To get all <Name> nodes use XPath expression/Names/Name. The first slash means that the <Names> node must
be a root node. SelectNodes method returns collection XmlNodeList which will contain the <Name> nodes. To
get value of sub node <FirstName> you can simply index XmlNode with the node name:
xmlNode["FirstName"].InnerText. See the example below.