module Nokogiri::CSS - nokogiri-1.10.3 Documentation

# module Nokogiri::CSS

### Public Class Methods

parse(selector) click to toggle source

Parse this CSS selector in `selector`. Returns an AST.

    # File lib/nokogiri/css.rb, line 16
    def parse selector
      Parser.new.parse selector
    end

xpath_for(selector, options={}) click to toggle source

Get the XPath for `selector`.

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