Get Parent attribute values xml
See the question and my original answer on StackOverflowSomething like this, with an inner loop:
XmlNodeList xnList = xml.SelectNodes("/instruction");
foreach (XmlElement xn in xnList)
{
text += "Instruction Name : " + xn.GetAttribute("name") + Environment.NewLine + Environment.NewLine;
foreach (XmlElement cn in xn.SelectNodes("connection"))
{
text += "Connection : " + xn.InnerText + Environment.NewLine + Environment.NewLine;
}
}