Install
sudo gem install nokogiri
Contribute
github.com/tenderlove/nokogiri

An HTML, XML, SAX, & Reader parser with the ability to search documents via XPath or CSS3 selectors… and much more

Nokogiri

Module Nokogiri::CSS

Public Class Methods

parse(selector) Show Source

Parse this CSS selector in selector. Returns an AST.

# File lib/nokogiri/css.rb, line 14 def parse selector Parser.new.parse selector end
xpath_for(selector, options={}) Show Source

Get the XPath for selector.

# File lib/nokogiri/css.rb, line 20 def xpath_for selector, options={} Parser.new(options[:ns] || {}).xpath_for selector, options end