ci riprovo ...
oppure:Codice PHP:var posts = from item in XFeed.Descendants("item")
select new
{
Title = item.Element("title").Value,
Description = item.Element("description").Value,
Published = item.Element("pubDate").Value,
Url = item.Element("link").Value,
Enclosure = (item.Element("enclosure") ?? new XElement("enclosure", new XAttribute("url", null))).Attribute("url").Value
};
:master:Codice PHP:Enclosure = item.Element("enclosure") ? item.Element("enclosure").Attribute("url").Value : null


Rispondi quotando