External DTD

External DTD

This is the same XML document with an external DTD:

<?xml version="1.0"?>

<!DOCTYPE note SYSTEM "note.dtd">
<note>
   <to>Tove</to>
   <from>Jani</from>
   <heading>Reminder</heading>
   <body>Don't forget me this weekend!</body>
</note>

This is a copy of the file “note.dtd” containing the Document Type Definition:

<?xml version="1.0"?>
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
Share this post
[social_warfare]
Validation
Internal DTD

Get industry recognized certification – Contact us

keyboard_arrow_up