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

Class Nokogiri::XML::XPath inherits from Object

Attributes

document RW

The Nokogiri::XML::Document tied to this XPath instance

Public Instance Methods

node_set() Show Source

Fetch the node set associated with this xpath context.

static VALUE node_set(VALUE self) { xmlXPathObjectPtr xpath; Data_Get_Struct(self, xmlXPathObject, xpath); VALUE node_set = Qnil; if (xpath->nodesetval) node_set = Nokogiri_wrap_xml_node_set(xpath->nodesetval); if(NIL_P(node_set)) node_set = Nokogiri_wrap_xml_node_set(xmlXPathNodeSetCreate(NULL)); rb_funcall(node_set, rb_intern("document="), 1, rb_iv_get(self, "@document")); return node_set; }