Click here to Skip to main content
15,907,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

i am very new in the software development. i am working on rss feed, and i want to display only image and their detail like name, type etc.from feed

i am currently following this site:[^]

but i am not able to extract the images which are coming in the description tag. Can any body help me out?

thanking you in anticipation.
Updated 17-Jun-12 20:15pm

1 solution

There isn't a specific tag for the images. In fact, the RSS feed standard does not have an image tag per entry (there is an overall feed image but that is usually a logo). Instead, HTML is embedded in the description for the feed. This is how Yahoo puts the images in and this is how they are displayed by this application. You cannot simply get just the images. You do have a couple options though. One would be to try to parse out the images using C#. You could do that by looking for <img as the start and /> after the start of the image tag. Thus, you could find any images inside the HTML of the description text. You could further look for just the URL inside that string to find the location you need to pull the image directly (if you didn't want to just display the image using HTML).
Share this answer
arshad alam 18-Jun-12 2:17am    
i am getting all the details in the description tag. what i need how to extract all the info.
Tim Corey 21-Jun-12 16:47pm    
I tweaked my answer slightly to fix the issue with the editor messing up what I was trying to say. Basically, you need to find the image tag inside the string and then get the contents out of that. It will involve some string parsing. You will probably need to use RegEx if you want to be the most efficient about it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900