Module XmlMini::Rexml::XPathFilter

  1. lib/wrest/xml_mini/rexml/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/rexml/xpath_filter.rb, line 6
6:       def filter(xml_body,xpath)
7:         doc = REXML::Document.new(xml_body)
8:         REXML::XPath.each(doc,xpath).to_a
9:       end