开发者

XPATH SELECTOR to get the next href element

开发者 https://www.devze.com 2023-03-06 15:45 出处:网络
Dear All,A newbie to XPATH, I need an xpath to get the HREF tag after thespan class=\"on\" list item The HTML structure is below. (sorry the editor wont allow me to post HTML in. Can I do 开发者_运

Dear All, A newbie to XPATH,

I need an xpath to get the HREF tag after the span class="on" list item

The HTML structure is below. (sorry the editor wont allow me to post HTML in. Can I do 开发者_运维百科that?) The image file is here: http://imageshack.us/f/846/xpathselector.png/

Please advise. Thank you very much. San


you described it in words...

//span[@class='on']/parent::li/following-sibling::li[1]/a

but why are you talking about XPath since you're working with JQuery and can use css selectors ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号