XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.Load("路径");
XmlElement element = xmlDoc.SelectSingleNode("//file") as XmlElement; //节点名称
Console.WriteLine(element.Attributes[0].Value.ToString());
C# 操作XML,获取节点的某个属性值
猜你喜欢
转载自blog.csdn.net/qq_35106907/article/details/86232256
今日推荐
周排行