当前位置: 首页 > 网络学院 > XML相关教程 > XML > XML 校验器
Errors in XML documents will stop your XML program.
XML文档中的错误会阻挠XML程序程序的运行。
The W3C XML specification states that a program should not continue to process an XML document if it finds an error. The reason is that XML software should be easy to write, and that all XML documents should be compatible.
W3C XML 规范中提到:如果发现错误,程序应停止继续处理XML文件。这是因为XML软件应该方便书写,并且所有的XML文档都应是相互兼容的。
With HTML it was possible to create documents with lots of errors (like when you forget an end tag). One of the main reasons that HTML browsers are so big and incompatible, is that they have their own ways to figure out what a document should look like when they encounter an HTML error.
使用HTML创建文档时,很可能产生大量错误(比如你忘记书写结束标签)。其中的一个主要原因就是HTML浏览器太过庞大,并且兼容性不好;当它们遇到HTML错误时,它们会以自己的格式显示文档。
With XML this should not be possible.
使用XML后就应该不会出现这种情况了。
To help you validate your xml, we have used Microsoft's XML parser to create an XML validator.
为了帮助你校验XML文档,我们通过Microsoft's XML 解析器创建了一个关于校验XML有效性的“校验器”。
Paste your XML in the text area below, and syntax-check it by pressing the "Validate" button.
把XML数据粘贴到下面的文本区域内,点击“提交”按钮进行校验。(仅支持IE6以上版本)
You can also validate your XML files by typing the URL of your file into the input field below, and then press the "Validate" button
你也可以先在下面的输入域内输入文件的URL地址,再点击“提交”按钮,进行校验。
If you want to syntax-check (validate) an error-free XML file, you can paste the following address into the filename field:
如果你想对一份XML文件的语法错误进行检测,你可以把下面的地址粘贴到文件名区域里
http://www.ruanchen.com/tech/school/xml/cd_catalog.xml
Note: If you get the error "Access denied" when accessing this file, it is because your Internet Explorer security settings do not allow access across domains!
注意: 如果访问文件时出现“拒绝访问”的错误提示,这说明你的IE安全设置不允许跨域访问。