Improvements for xmleql

This adds some improvements for the xmleql test assertion. When passed in a
document, use the documentElement. Also improve error reporting as suggested
by @tschaub.