摘要:
require 'nokogiri'XML_FILE = "C:\\Users\\chenpassion\\Desktop\\20130806.xml"xml = Nokogiri::XML.parse(File.read(XML_FILE), XML_FILE)xml.xpath('//NewspaperReport').each {|x| if !x.attributes.include?("DownloadState") || x.attributes["DownloadState"].value 阅读全文