c# - How to recuperate the image of this rss feed ? -


i'm developing wp7 app, it's simple rss reader. i'm able recuperate date, title , description...

but when try recuperate image rss feed, catch nullreferenceexception... here wrong line :

itemrss.image = new uri(item.element("enclosure").attribute("url").value); 

so, what's instruction recuperate image please ? in advance

there no "enclosure" element in feed.

when image, 1 contained in text? if so, use "content" element retrieve html , use the regex have given in answer.

    var reg = new regex("src=(?:\"|\')?(?<imgsrc>[^>]*[^/].(?:jpg|bmp|gif|png))(?:\"|\')?");     var match=reg.match(source);     if(match.success)     {       var encod = match.groups["imgsrc"].value;     } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -