How to parse XML (DataSet) in Windows Phone 7

前端 未结 2 507

I have a XML Like Below, But i am not able to parse it. Please help me to parse the below XML.



        
2条回答
  •  悲&欢浪女
    2021-01-29 00:06

    What is blocking you?

    You can try this:

            var resultNewDataSet = XElement.Parse(xmlContent);
    
            var result = resultNewDataSet.Descendants("Table")
                .Select(t => new
                    {
                        aaa = t.Descendants("aaa").First().Value,
                        bbb = t.Descendants("bbb").First().Value
                    });
    
            foreach (var res in result)
            {
                System.Diagnostics.Debug.WriteLine("aaa: " + res.aaa + " / bbb: " + res.bbb);
            }
    

提交回复
热议问题