Question: How do I syntax-check my XML in modern browsers (anything but IE)?
I\'ve seen a page on W3Schools which includes an XML syntax-checker. I don\'t kno
Edit: Here is a more concise example, from MDN:
var xmlString = 'hey!';
var domParser = new DOMParser();
var dom = domParser.parseFromString(xmlString, 'text/xml');
// print the name of the root element or error message
dump(dom.documentElement.nodeName == 'parsererror' ? 'error while parsing' : dom.documentElement.nodeName);