1. A brief introduction to XML file constraints and DTD. We write documents to constrain the writing specifications of an XML document. This is called XML constraints. Commonly used constraint technologies are: XML DTDXML The basic concept of SchemaDTD: document type definition Document type definition DTD files are generally used in conjunction with XML files, mainly to constrain XML files. XML files introduce DTD files, so that XML can customize tags but are constrained by DTD files. For example, in the previous section, XML was used to describe a class's information. If we defined an tag for each student, there would be no syntax error, but it would not conform to the semantics. How could students be described by area? At this time we need to use a DTD file to constrain this XML.
1. XML—Detailed explanation of DTD for XML document constraints
##Introduction: We write documents to constrain the writing specifications of an XML document, which is called XML constraints.
##Introduction : Document Type Definition is a set of syntax rules for tags established for data exchange between programs. It is part of the Standard Generalized Markup Language (SGML) and Extensible Markup Language (XML) version 1.0 specifications, and documents can be verified according to certain DTD syntax rules to ensure that the format conforms to this rule. Document type definitions can also be used to ensure the legality of Standard Universal Markup Language and Extensible Markup Language document formats. You can compare documents and document type definition files to check whether the document conforms to the specification and whether the elements and tags are used correctly. File instances provide applications with a format for exchanging data.
The above is the detailed content of Recommended content for detailed explanation of DTD. For more information, please follow other related articles on the PHP Chinese website!