Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Scott Robinson 54 posts 75 karma points
    Jul 01, 2013 @ 11:25
    Scott Robinson

    Extracting image from RSS text


    I'm using this script, kindly posted on this forum that lists items from an rss. My issue is I have a <img> that is contanined within the <description> that I wish to remove and position above the <title>. The way it renders is:


    <description><img> body copy </description>

    What I need is:




    Any idea how I would do this. The script I am using is:


    @using System.Xml;



        //Get the XML from remote URL

        XmlDocument xml = new XmlDocument();


        //URL currently hardcoded - but you could use a macro param to pass in URL



        //Select the nodes we want to loop through

        XmlNodeList nodes = xml.SelectNodes("//item");


        //Traverse the entire XML nodes.

        foreach (XmlNode node in nodes)


            //Get the value from the <title> node

            var title = node.SelectSingleNode("title").InnerText;


            //Get the value from the <description> node

            var description = node.SelectSingleNode("description").InnerText;








Please Sign in or register to post replies

Write your reply to: