Xpath String-Value predicate

Discussion in 'XML' started by thoraddict, May 8, 2009.

  1. thoraddict

    thoraddict

    Joined:
    May 8, 2009
    Messages:
    1
    Hi,
    I am stuck trying to get the following to work.

    /image_list/image[image_purpose='Thumbnail']/image_url

    I don't get any errors that I can find, just doesn't pull the info.

    The xml looks like this.

    <image>
    <image_url><![CDATA[/room/thumb.jpg]]></image_url>
    <image_caption><![CDATA[Whistler Hotel]]</image_caption>
    <image_purpose><![CDATA[Thumbnail]]></image_purpose>
    </image>

    If I put image[2] it works, but that's not what I want.

    Any ideas? I don't think I need the CDATA....

    Thanks,
     
    thoraddict, May 8, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sabba
    Replies:
    0
    Views:
    636
    Sabba
    May 9, 2006
  2. raymon2683@gmail.com

    Xpath predicate error

    raymon2683@gmail.com, Feb 23, 2007, in forum: XML
    Replies:
    1
    Views:
    482
    Martin Honnen
    Feb 24, 2007
  3. Duncan Smith
    Replies:
    7
    Views:
    491
    Joseph Kesselman
    Mar 22, 2007
  4. Ziphims

    XPath predicate problem

    Ziphims, Jan 11, 2008, in forum: XML
    Replies:
    6
    Views:
    1,786
    P. Lepin
    Jan 12, 2008
  5. Wabiloo
    Replies:
    1
    Views:
    846
    Martin Honnen
    Jan 25, 2008
Loading...

Share This Page