Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xpath String-Value predicate

Reply
Thread Tools

Xpath String-Value predicate

 
 
thoraddict thoraddict is offline
Junior Member
Join Date: May 2009
Posts: 1
 
      05-08-2009
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,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XPath: Using the outside context inside a square bracket predicate Wabiloo XML 1 01-25-2008 04:38 PM
XPath predicate problem Ziphims XML 6 01-12-2008 06:13 PM
Specifying predicate queries with XPath? Duncan Smith XML 7 03-22-2007 01:49 PM
Xpath predicate error raymon2683@gmail.com XML 1 02-24-2007 01:18 PM
XPATH Predicate Syntax question Sabba XML 0 05-09-2006 10:48 AM



Advertisments