Module XmlMini::LibXML::XPathFilter

  1. lib/wrest/xml_mini/libxml/xpath_filter.rb

Methods

public instance

  1. filter

Public instance methods

filter (xml_body,xpath)

Enables filtering of an xml response using a specified xpath Returns an array of elements matching the xpath

[show source]
   # File lib/wrest/xml_mini/libxml/xpath_filter.rb, line 6
6:       def filter(xml_body,xpath)
7:         doc = ::LibXML::XML::Document.string(xml_body)
8:         doc.find(xpath).to_a
9:       end