var xpathExpr = string.Format("//{0}[@{1}]", childNodeName, attrName);
var nodes = GetChildNodesByXPathExpr(parentXmlNode, xpathExpr);
if (nodes != null && nodes.Count > 0) {
var nodeCount = nodes.Count;
var attrVals = new string[nodeCount];
for (var i = 0; i < nodeCount; i++) {
attrVals[i] = ((XmlElement)nodes[i]).GetAttribute(attrName);
}
var xpathExpr = string.Format(".//{0}", childNodeName);
var childNodes = GetChildNodesByXPathExpr(parentXmlNode, xpathExpr);
if (childNodes != null && childNodes.Count > 0) {
var nodeCount = childNodes.Count;
var nodeTexts = new string[nodeCount];
for (var i = 0; i < nodeCount; i++) {
nodeTexts[i] = childNodes[i].InnerText;
}
var childNodes = GetChildNodes(parentXmlNode);
if (childNodes != null && childNodes.Count > 0) {
var nodeCount = childNodes.Count;
var nodeTexts = new string[nodeCount];
for (var i = 0; i < nodeCount; i++) {
nodeTexts[i] = childNodes[i].InnerText;
}