posted 17 years ago
Hi,
I have created message.xml with the following contents:
<?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note>
As per my knowlege, the xml should have the elements described as per inlined DTD. If I remove any tag, say I remove <body> tag, and if I view this xml in browser, it should give error. But amazingly, it did not give any error. Why and How?
Thanks,
Guru