【发布时间】:2011-06-07 14:21:06
【问题描述】:
如何获取 XmlNode 中的文本?见下文:
XmlNodeList nodes = rootNode.SelectNodes("descendant::*");
for (int i = 0; i < nodes.Count; i++)
{
XmlNode node = nodes.Item(i);
//TODO: Display only the text of only this node,
// not a concatenation of the text in all child nodes provided by InnerText
}
而我最终想要做的是在每个节点的文本中添加“HELP:”。
【问题讨论】:
标签: c# xml xmlnodelist