You would need to select just the text content using the XPath text()
function, for instance:
For Each textNode As XmlText In doc.SelectNodes("//cmdset/text()")
Console.WriteLine(textNode.InnerText)
Next
Notice that I also changed the iterator from an XmlElement
variable to an XmlText
variable, since text content in an XML document is not considered to be element nodes, but rather text nodes.