Case
<?xml version= "1.0" encoding= "UTF-8" standalone= "yes"?>
<! DOCTYPE book[<! ELEMENT Book (computer) *>
<! ELEMENT computer (Book_name,price,author) >
<! ELEMENT book_name (#PCDATA) > <! ELEMENT Price (#PCDATA) > <! ELEMENT author (#PCDATA) >]>
<book>
<computer> <author>redarmychen</author>
<book_name>javaweb Development </book_name>
<price>30.0</price>
</computer> <computer>
Development of <BOOK_NAME>CSS Applications </book_name>
<price>1000</price>
<author>redarmy_Chen</author>
</computer> </book>
Case study:
The standalone property in the first line of the XML declaration statement takes a "yes" value to indicate that the document is a stand-alone document in the document that all the required entity declarations contain.
The second line declares a DTD constraint
The third line defines that the book element has multiple identical elements-the computer element
The line four defines three elements in the computer element: Book_name, Price, author
Line five defines the Book_name element as #PCDATA类型
Line six defines the #PCDATA type of the price element
Line seventh defines the author element as #PCDATA type
The end sign of the Eighth Act Declaration