Module: XmlMini::Rexml::XPathFilter
- Included in:
- ActiveSupport::XmlMini_REXML
- Defined in:
- lib/wrest/xml_mini/rexml/xpath_filter.rb
Instance Method Summary collapse
-
#filter(xml_body, xpath) ⇒ Object
Enables filtering of an xml response using a specified xpath Returns an array of elements matching the xpath.
Instance Method Details
#filter(xml_body, xpath) ⇒ Object
Enables filtering of an xml response using a specified xpath Returns an array of elements matching the xpath
6 7 8 9 |
# File 'lib/wrest/xml_mini/rexml/xpath_filter.rb', line 6 def filter(xml_body,xpath) doc = REXML::Document.new(xml_body) REXML::XPath.each(doc,xpath).to_a end |