Listing 1
<?xml version="1.0"?>

<!ELEMENT title (#PCDATA)>
<!ELEMENT pages (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ELEMENT author (firstname,lastname)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>

<!ELEMENT book (title, pages, price,
ISBN, author, category*)>

Listing 2
<?xml version="1.0"?>
<!DOCTYPE book SYSTEM "book.dtd">
<book>
<title>Computer Book</title>
<pages>100</pages>
<price>19.95</price>
<ISBN>123456789</ISBN>
<author>
<firstname>Kelly</firstname>
<lastname>Brown</lastname>
</author>
<category>Computer</category>
<category>Education</category>
</book>

Download Additional Code (Zip File Format)