From: ser@... (Sean Russell) Date: 2004-03-18T10:34:34+09:00 Subject: Re: XML Unit? Aidan Rogers wrote in message news:... > Is there a ruby equivalent of Java's XML Unit, whereby you can compare two > pieces of XML for structure (regardless of whitespace, formatting, etc.)? Do you just want to test for equality, or are you looking for a diffing algorithm? When you say "regardless of whitespace", do you mean just collapsing whitespace, or just pure whitespace nodes? ruby -rrexml/document -e ' pref = {:ignore_whitespace_nodes=>:all} a = REXML::Document.new( " sean ", pref ) b = REXML::Document.new( "sean", pref) puts a.to_s == b.to_s' => true --- SER