当我传递特定ID时如何读取xml数据?

时间:2014-09-27 07:41:14

标签: c# xml

我要求我必须读取特定id的xml数据。例如,我想要   检索id:21中的所有区域名称。任何人都可以帮助我

<?xml version="1.0" encoding="utf-8" ?>
<Rnames>
<org id="19">
<District name="District 19A1"/>
<District name="District 19A2"/>
<District name="District 19A3"/>
<District name="District 19A4"/>
</org>
<org id="20">
<District name="District 20A1"/>
<District name="District 20A2"/>
</org>
<org id="21">
<District name="District 21A1"/>
<District name="District 21A2"/>
<District name="District 21A3"/>
<District name="District 21A4"/>
</org>
<org id="22">
<District name="District 22A1"/>
<District name="District 22A2"/>
</org>
<org id="23">
<District name="District 23A1"/>
<District name="District 23A2"/>
</org>
</Rnames>

0 个答案:

没有答案