Check for markup equivalence, not string match

This gets around the issue of different versions of libxml generating subtly
different whitespace/newline output.