1 2 3 4 5 6 7 8 9 10 11
require 'nu/validator' require 'open-uri' ARGV.each do |arg| doc = Nu::Validator::parse(open(arg)) doc.xpath("//*[local-name()='font']").each do |font| font.attributes.each do |name, attr| puts "#{name} => #{attr.value}" end end end