Module of the day

acme on 2002-11-26T15:57:10

I tend to use many different modules at work. New projects mean I get to use new modules all the time. One that was particularly cute is XML::SemanticDiff. This project involved generating a huge XML file, handing it off to people who don't really know much about computers, let alone XML, and automatically taking it back and generating Perl modules from it. The trick is to make sure that the people haven't messed it up. XML::SemanticDiff takes two XML files and returns a list of the semantic differences between them: changed chardata, missing or extra elements, missing or extra attributes. It gives back the node's xpath and line numbers.

It rocks, thanks Kip!


Algorithm

Dom2 on 2002-11-26T16:29:09

I was particularly impressed when I read how it worked... It was one of those "that's blindingly simple yet very cunning" moments.

-Dom