我想知道如何使用linq检索XML,看起来完全一样?在XML中检索只有一个Int
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">20</int>
我应该使用linq吗?我不知道这个热门的号码..
这是我尝试使用的代码,我stucj后选择..有人可以帮助我吗?
public void wc_DownloadTopFolder(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
{
try
{
// Retrieving the Top Folders
XDocument xdoc = XDocument.Parse(e.Result, LoadOptions.None);
int i = from query in xdoc.Descendants("int")
select new int
{
};
}
你在这一行只是有兴趣更大的XML文件,或者那是你的xml文件的全部内容? – R0MANARMY 2012-04-19 13:41:03