更新时间:2023-02-05 20:35:23
试试这个:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("../../XMLFile1.xml");
XmlNode node = xmlDoc.SelectSingleNode("/SETTING_LIST/setting[name='first']");
foreach (XmlNode nd in node)
{
richTextBox1.Text += nd.OuterXml + "\n";
}
另请参阅以下类似文件:
Also please refer to the following similar documents:
如何:查找同级节点(XPath-LINQ to XML)(C#)
问候,
Stanly