1 看下xml的错误的配置 from多了一个m
<?xml version="1.0"?> <!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> <note> <to>Tove</to> <fromm>Jani</fromm> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
2 验证代码
<html> <body> <h3> This demonstrates a parser error: </h3> <script type="text/javascript"> var xmlDoc = new ActiveXObject("Microsoft.XMLDOM") xmlDoc.async="false" xmlDoc.validateOnParse="true" xmlDoc.load("err.xml") document.write("<br />Error Code: ") document.write(xmlDoc.parseError.errorCode) document.write("<br />Error Reason: ") document.write(xmlDoc.parseError.reason) document.write("<br />Error Line: ") document.write(xmlDoc.parseError.line) </script> </body> </html>
3 用ie打开,搜狗看不出来
4 提示11行有错 ,11行的确有问题