当前位置: 首页 > 网络学院 > XML相关教程 > XML > XML 的有效性验证
XML with correct syntax is Well Formed XML.
使用正确的语法可以使XML的格式标准化。
XML validated against a DTD is Valid XML.
经过DTD验证的XML是有效的XML。
A "Well Formed" XML document has correct XML syntax.
格式标准的XML文档包含正确的XML语法规则。
A "Well Formed" XML document is a document that conforms to the XML syntax rules that were described in the previous chapters:
正如前几章中所提到过的那样,符合XML语法规则的XML才能算是格式标准的XML:
<?xml version="1.0" encoding="ISO-8859-1"?> |
A "Valid" XML document also conforms to a DTD.
一份“有效”的XML文档还得符合 DTD 规则。
A "Valid" XML document is a "Well Formed" XML document, which also conforms to the rules of a Document Type Definition (DTD):
符合DTD规则的XML文档才是格式正确的XML文档:
<?xml version="1.0" encoding="ISO-8859-1"?> |
A DTD defines the legal elements of an XML document.
DTD详细定义了XML文件中的合法元素。
The purpose of a DTD is to define the legal building blocks of an XML document. It defines the document structure with a list of legal elements. You can read more about DTD, and how to validate your XML documents in our DTD tutorial.
DTD的目的就是定义一份XML文档中的合法区块。它定义了一系列合法元素。在我们的DTD教程中,你可以了解更多关于DTD的内容,以及验证XML文档有效性的fang。
XML Schema is an XML based alternative to DTD.
XML Schema 是基于XML的,它是DTD的另一个替换方式。
W3C supports an alternative to DTD called XML Schema. You can read more about XML Schema in our Schema tutorial.
W3C支持DTD的另一个替换方式,我们称之为 XML Schema。在Schema 教程中,你可以学习到关于 XML Schema 的更多内容。
To help you check the syntax of your xml files, we have created this link so that you can syntax-check any XML file.
为了帮助你检查XML文件语法的正确性,我们设置了 关于XML文件语法规则校验 的链接,可能对你有所帮助。