I was following the tutorial of dtd at w3schools. I copied and pasted the following onfrom a site and called it t.dtd but when i tried to validate it in Eclipse it gets an error.
I added the encoding part because it was complaining about the first line missing attributes but then it got an error for the second line.
The error says "The markup declarations contained or pointed by the document type declaration must be well-formed."
<?xml version="1.0" encoding="UTF-8"?>
<!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>