0
我有喜欢的XML以下:如何使用xmldocument中的子节点属性值获取父节点的属性值?
<Root Details="false">
<Product count="45" Name="Success">
<Source Id="123" Name="58372">
<Project Id="ABC" Level = "Good">
<Rest of the document/>
</Project>
</Source>
<Source Id="456" Name="83729">
<Project Id="DEF" Level = "Better">
<Rest of the document/>
</Project>
</Source>
<Source Id="789" Name="29832">
<Project Id="GHI" Level = "BAD">
<Rest of the document/>
</Project>
</Source>
</Product>
</Root>
我需要通过项目节点的“id”属性值来获得源节点的“名称”值的值。例如,如果项目ID值是“GHI”,那么我需要值“29832”。有没有办法像这样?