w3pop.com :: ÍøÂçѧԺ :: 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µÄÁíÒ»¸öÌæ»»·½Ê½£¬ÎÒÃdzÆÖ®Îª 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ÎļþÓï·¨¹æÔòУÑé µÄÁ´½Ó£¬¿ÉÄܶÔÄãÓÐËù°ïÖú¡£