Skip to content

Instantly share code, notes, and snippets.

@dball
Created July 8, 2011 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dball/1072717 to your computer and use it in GitHub Desktop.
Save dball/1072717 to your computer and use it in GitHub Desktop.
def xml_equal?(*args)
return nil if args.empty?
docs = args.map do |xml|
Nokogiri.XML(xml) { |config| config.strict }
end
signatures = docs.map do |doc|
Lorax::Signature.new(doc.root).signature
end
signatures.uniq.length == 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment