find me on
 
twitter del.icio.us
linkedin flickr
goodreads flixster
facebook aim
dopplr
tweets
 
del.icio.us
 
recent posts
 
history
 
November 2008
M T W T F S S
« Oct   Dec »
 12
3456789
10111213141516
17181920212223
24252627282930
 
jason.prado (@) gmail.com real tangible
 
Diff two XML documents
 

I came across the need to compare two XML trees for equality in unit tests I’m writing for a project you’ll hopefully hear about soon. I started to write a tree-walking comparer then thought I’d google around to see if anyone had done this for me. simplexmldiff is a clever script that just reads in two XML docs, pretty prints them, and then diffs their output. Brilliant. It isn’t perfectly accurate due to whitespace, but I don’t care about that for this project. I reimplemented what I needed of it in 4 lines of python. hellah.

You can leave a response, or trackback from your own site.

Leave a Reply