def doc_to_hash(doc, xpath = "/")
      h = Hash.from_xml(doc.xpath(xpath).to_xml)
      h
    end
def doc_to_hash(doc, xpath = "/")
      h = Hash.from_xml(doc.xpath(xpath).to_xml)
      h
    end
Converts document to hash

 @param doc [Object] Nokogiri::XML::Document
 @param xpath [String] Document path to convert to hash
 @return [Hash] Hash that was produced from XML document