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')