I have an XML like this:
1 Declaration of Human Rights
//xn=list of parent nodes...... foreach (XmlNode xn in xnList) { foreach (XmlNode child in xn.ChildNodes) { if (child.Name.Equals("name")) { name = child.InnerText; } if (child.Name.Equals("age")) { age = child.InnerText; } } }