日期:2014-05-19  浏览次数:21062 次

C# 如果读取xml某节点的值
<?xml   version= "1.0 "   encoding= "GB2312 "   ?>
<item   xmlns= "http://tempuri.org/country.xsd ">
<Country   name= "中国 "   value= "0 ">
<Province   name= "浙江 "   value= "0 "> </Province>
<Province   name= "北京 "   value= "1 "> </Province>
<Province   name= "福建 "   value= "2 "> </Province>
<Province   name= "甘肃 "   value= "3 "> </Province>
<Province   name= "安徽 "   value= "4 "> </Province>
<Province   name= "广西 "   value= "5 "> </Province>
<Province   name= "贵州 "   value= "6 "> </Province>
<Province   name= "海南 "   value= "7 "> </Province>
<Province   name= "河北 "   value= "8 "> </Province>
<Province   name= "河南 "   value= "9 "> </Province>
<Province   name= "黑龙江 "   value= "10 "> </Province>
<Province   name= "湖北 "   value= "11 "> </Province>
<Province   name= "湖南 "   value= "12 "> </Province>
<Province   name= "吉林 "   value= "13 "> </Province>
<Province   name= "江苏 "   value= "14 "> </Province>
<Province   name= "江西 "   value= "15 "> </Province>
<Province   name= "内蒙古 "   value= "16 "> </Province>
<Province   name= "宁夏 "   value= "17 "> </Province>
<Province   name= "青海 "   value= "18 "> </Province>
<Province   name= "山东 "   value= "19 "> </Province>
<Province   name= "山西 "   value= "20 "> </Province>
<Province   name= "陕西 "   value= "21 "> </Province>
<Province   name= "上海 "   value= "22 "> </Province>
<Province   name= "四川 "   value= "23 "> </Province>
<Province   name= "天津 "   value= "24 "> </Province>
<Province   name= "新疆 "   value= "25 "> </Province>
<Province   name= "西藏 "   value= "26 "> </Province>
<Province   name= "云南 "   value= "27 "> </Province>
<Province   name= "广东 "   value= "28 "> </Province>
<Province   name= "辽宁 "   value= "29 "> </Province>
<Province   name= "重庆 "   value= "30 "> </Province>
</Country>
<Country   name= "中国台湾 "   value= "1 ">
<Province   name= "台北 "   value= "100 "> </Province>
<Province   name= "高雄 "   value= "101 "> </Province>
</Country>
<Country   name= "中国香港 "   value= "2 ">