From: James Britt Date: 2004-03-18T12:43:19+09:00 Subject: Re: XML Unit? Phlip wrote: > Aidan Rogers wrote: > > >>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.)? > > > That is a job for XSLT. (I suspect.) Could be. You might transform the each bit of XML to another, canonical, string, omitting the content. Then see if they both give the same string. There's no native Ruby XSLT lib, though, if that's an issue. But it should be trivial to write a lib that uses the REXML stream parser to simply pass through the markup structure while swallowing the content. James