yaronn / xpath.js

An xpath module for node, written in pure javascript
103 stars 100 forks source link

following:: not working as tested in Chrome #11

Closed ericstiles closed 8 years ago

ericstiles commented 10 years ago

First off, I really enjoy this application. It's been very beneficial.

I'm parsing the following link: http://www.craigslist.org/about/sites in chrome where

//h4[text()='Alabama']/following::ul[1]/li/a

gives me all the a nodes following the <h4>Alabama</h4> tag in chrome

With the xpath.js tool I'm actually getting the a nodes for the state of Illinois.

When I look a little deeper, all states in the first column return the Illinois cities a node. All states in the second column return the cities for Montana.

Thanks again, Eric

yaronn commented 10 years ago

Hi @ericstiles

Thanks for reporting this. I have committed a fix and it is working now.

Yaron