normalize xml before sending to validator

fixes: http://manage.dimagi.com/default.asp?128579