Tryit Editor v1.8

Source Code:
<html> <body> <script> xmlDoc=document.implementation.createDocument("","",null); xmlDoc.async=false; xmlDoc.load("note_error.xml"); if (xmlDoc.documentElement.nodeName=="parsererror") { errStr=xmlDoc.documentElement.childNodes[0].nodeValue; errStr=errStr.replace(/</g, "<"); document.write(errStr); } else { document.write("XML is valid"); } </script> </body> </html>
Result:
W3Schools.com - Try it yourself