ilinsky / jquery-xpath

jQuery XPath plugin (with full XPath 2.0 language support)
180 stars 64 forks source link

Objects are returned in stead of values? #13

Closed bakman2 closed 9 years ago

bakman2 commented 9 years ago

Items that are returned are objects ? (in my case that is) If I want to have the value i have to add .nodeValue eg;

a.current = a.temp[0].nodeValue

I must be overlooking something, but what ?

bakman2 commented 9 years ago

I found it, the trick was to use /string() in stead of /text()

.xpath("//windDirection//preceding-sibling::temperature/@value/string()")