110,534
社区成员
发帖
与我相关
我的任务
分享
<?xml version="1.0"?>
<root >
<Ge Type="All" />
<!-- test1 -->
<u>
<!-- test2. -->
<SS>
<s Name="t1" U="test1" />
<s Name="t2" U="testb" />
<s Name="t3" U="testd" />
</SS>
<!-- test3 -->
<D I="2l" />
</u>
</root>
XmlElement el = doc.SelectSingleNode("//s[@Name='t2']") as XmlElement;
el.SetAttribute("U", "test2");
string xpath = treeVw.SelectedNode.FullPath
如何能转化成可用的xpath
谢谢