Create External DTD declaration for BOOKs XML document.(Element type declaration)
CODING:
.DTD FILE:
<!ELEMENT bookDB (book)>
<!ELEMENT book (name,author)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT author (#PCDATA)>
.XMLFILE:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookDB SYSTEM "DHTML_XML3_6.dtd">
<bookDB>
<book>
<name>Five Point Someone</name>
<author>Chetan Bhagat</author>
</book>
<book>
<name>I Too Had A Love Story!</name>
<author>Ravindra Singh</author>
</book>
<book>
<name>Goosebumps - The Werewolf</name>
<author>Richard</author>
</book>
</bookDB>
CODING:
.DTD FILE:
<!ELEMENT bookDB (book)>
<!ELEMENT book (name,author)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT author (#PCDATA)>
.XMLFILE:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookDB SYSTEM "DHTML_XML3_6.dtd">
<bookDB>
<book>
<name>Five Point Someone</name>
<author>Chetan Bhagat</author>
</book>
<book>
<name>I Too Had A Love Story!</name>
<author>Ravindra Singh</author>
</book>
<book>
<name>Goosebumps - The Werewolf</name>
<author>Richard</author>
</book>
</bookDB>
Comments
Post a Comment