XML with correct syntax is called "well-formed" XML. The XML verified by a DTD is a "legal" XML. A well-formed XML document with a & quot; well-formed & quot; has the correct syntax. A well-formed & quot; XML document follows the XML syntax rules described in the previous chapters: XML with the correct syntax is called "well-formed" XML.
The XML verified by a DTD is a "legal" XML.
Well-formed XML documents
A "well-formed" XML document has the correct syntax.
A "well-formed" XML document follows the XML syntax rules described in the previous chapters:
XML documents must have root elements
The XML document must have a close tag.
XML tags are case sensitive.
XML elements must be correctly nested
The XML attribute must be enclosed in quotation marks.
George
John
Reminder
Don't forget the meeting this weekend!
Verify the XML document
A valid XML document is a "well-formed" XML document, which also complies with the syntax rules of Document Type Definition (DTD:
George
John
Reminder
Don't forget the meeting this weekend!
In the preceding example, the DOCTYPE declaration references the external DTD file. The following section shows the content of this file.
XML DTD
A dtd defines the structure of an XML document. It uses a series of legal elements to define the document structure:
]>
XML Schema
W3C supports an XML-based DTD replacement named XMLSchema:
The above is the details shared by the XML verification code. For more information, see other related articles in the first PHP community!