Posted on 2007-03-20 20:19:08-07 by fullwindsor
xpath predicates with whitespaces
hello all,

i'm having a problem with xpath predicates including whitespaces. i have this query:

/html/body/table[caption/descendant::*['Some text']]

i expect it to return only one object, as i know that the xml i'm parsing has the string 'Some text' only once. however, i get 2 objects: the right one, and another one, that only matches one of the words of the 'Some text' string.

anybody knows whether this is a feature or a bug?
also, is there any way to match the whole predicate string as one?


greetings,
full
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.