I am wondering how to use the linq retrieving an XML which looks exactly like this?
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">20</int>
Should I use the linq? I don’t know how to retrieve this number.
This is the code I try to use, I’m stuck after the select. Can someone help me?
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
{
};
}
You can use this:
If you are not sure the returned value is a number, you should use this: