ITeye博客

ruby-nokogiri -xpath 用法说明

sitoto · 2012-08-01 14:14 · ruby · 开源软件 · xpath · Markdown

//div[@xxx = "sss"]/table[2]/tr[1]/td[1]/a/@href

上面那段代码的意思说清楚,基本上可以用xpath 解析html了。

xpath() at_xpath()

做个记录先

参考资料:http://stackoverflow.com/questions/2683298/xpath-matching-attribute-and-content-of-an-element

193737895群,可交流。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。