Using Xpath with XmlDataSource Control RRS feed

  • Question

  • User-72198832 posted

    Having trouble formatting xpath command to do what I need.

    I want to select all xml data greater or equal to a specified value.

    Data is attached to XmlDataSource control.

    Here's sample of my xml.

    <?xml version="1.0"?>
    <Project Descr="RYAN MATTAWAY" Code="MATTA"/>
    <Project Descr="RYAN SOD CUTTER" Code="SOD"/>
    <Project Descr="SAFETY  MEETING" Code="30"/>
    <Project Descr="SMALL UTILITY TRAILERS" Code="STRLR"/>
    <Project Descr="SMOOTH ROLLER" Code="ROLLR"/>
    <Project Descr="SPREADERS" Code="SPRDR"/>
    <Project Descr="STAFF MEETING" Code="31"/>
    <Project Descr="SWAP DAMAGED REEL" Code="11"/>
    <Project Descr="TOP DRESSER" Code="DRESS"/>
    <Project Descr="TUNDRA PICKUP" Code="TOYOT"/>
    <Project Descr="TURFGATOR" Code="DGATR"/>
    <Project Descr="UPDATE COMPUTER PROGRAMS" Code="02"/>
    <Project Descr="Z TRAK ROTORY" Code="Z997R"/>

    I want to select all Greater than or Equal to value of "TOP" in the Descr node.

    I can do XmlDataSource.xpath="Project_List/Project[@Descr='TOP DRESSER']" and retrieve one item

    but  changing to use Greater or Equal XmlDataSource.xpath="Project_List/Project[@Descr >= 'TOP']" retrieves nothing

    How do I get this to work ?


    Friday, May 20, 2016 6:46 PM