--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Search this node for XPath <tt>paths</tt>. <tt>paths</tt> must be one or more XPath queries. A hash of namespaces may be appended. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  node.xpath('.//title')\n  node.xpath('.//foo:name', { 'foo' =&gt; 'http://example.org/' })\n  node.xpath('.//xmlns:name', node.root.namespaces)\n"
- !ruby/struct:SM::Flow::P 
  body: "Custom XPath functions may also be defined. To define custom functions create a class and implement the # function you want to define. For example:"
- !ruby/struct:SM::Flow::VERB 
  body: "  node.xpath('.//title[regex(., &quot;\\w+&quot;)]', Class.new {\n    def regex node_set, regex\n      node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ }\n    end\n  }.new)\n"
full_name: Nokogiri::XML::Node#xpath
is_singleton: false
name: xpath
params: (*paths)
visibility: public
