fixed clean_xml regexes, added dom-parser error handler for logging