TJ: parseHtmlAsXml can now handle parse errors.