Last Modified
2013-09-08 06:40:48 +0000
Requires

Description

This class encapsulates an XML file. If Mechanize finds a content-type of 'text/xml' or 'application/xml' this class will be instantiated and returned. This class also opens up the search and at methods available on the underlying Nokogiri::XML::Document object.

Example:

require 'mechanize'

agent = Mechanize.new
xml = agent.get('http://example.org/some-xml-file.xml')
xml.class #=> Mechanize::XmlFile
xml.search('//foo[@attr="bar"]/etc')