Copied to clipboard

Flag this post as spam?

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


  • Kadir 30 posts 80 karma points
    Jan 27, 2013 @ 20:46
    Kadir
    0

    Filtering XML Output

    Hello,

    I am using an XML reader like below. I would like to filter results according to XML data. 

    @{

    //Fetch RSS XML

    XmlTextReader udBrudRSS = new XmlTextReader("http://myblog.com/rss");

    //Create new XML document

    XmlDocument doc = new XmlDocument();

    //Load in our remote XML into our XML document

    doc.Load(udBrudRSS);

    //Select our nodes we want with some xPath

    XmlNodeList rssItems = doc.SelectNodes("//product");

    }

    For example in my XML there are product types and I only would like to show data only about Jackets product types.

     

    <product>
    <title>XXXX</title>
    <type>Jackets</type>
    <image>.....</image>
    <link>.....</link>
    </product>

     

    Is this possible with the current XML reader I am working on?

Please Sign in or register to post replies

Write your reply to:

Draft