clear DOM buffer before reporting failed xml syntax. This is the cause of the img tag crash exploit when putting newlines in an img tag