请问如何读取xml中的数据

读取ID为01或02的Item数据,请问如何实现

 <XX>
  <Item>
    <CD Value="0"/>
    <ID Value="01"/>
    <TX Value="OutOfService"/>
    <State Value="0"/>
  </Item>
  <Item>
    <CD Value="1"/>
    <ID Value="01"/>
    <TX Value="TapTap"/>
    <State Value="0"/>
  </Item>
  <Item>
    <CD Value="0"/>
    <ID Value="02"/>
    <TX Value="Oppos"/>
    <State Value="1"/>
  </Item>
<Item>
    <CD Value="0"/>
    <ID Value="08"/>
    <TX Value=" "/>
    <State Value="1"/>
  </Item>
</XX>

 XDocument addList = XDocument.Load(@"XX");
  var text = from v in addList.Descendants("XX")
                               from x in v.Elements()
                               select x;
    foreach (var node in text)
                    {
                        string msg = string.Join(",", node.Elements().Select(el => el.Attribute("Value").Value));
                        Console.WriteLine(msg);

                    }

http://www.cnblogs.com/lingyao/p/5708929.html

读取Xml的方法有很多
1: 使用 XmlDocument
2: 使用 XmlTextReader
3: 使用 Linq to Xml