Maybe you write a file.dtd!
If i try to write this code into a DTD file I get this error (extra content at the end of the file):
test.dtd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Catalog [
<!ELEMENT Catalog (Movie+)>
<!ELEMENT Movie (Title,Year,Length,TopBilledActors)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Year (#PCDATA)>
<!ELEMENT Length (#PCDATA)>
<!ELEMENT TopBilledActors (#PCDATA)>
<!ATTLIST Movie movieID ID #REQUIRED>
<!ATTLIST Movie genre (Drama|Fantasy|Action|Comedy) #REQUIRED>
<!ATTLIST Movie earningsrank CDATA #IMPLIED>
]>
But if i write a xml file it work fine (and nothing error):
test.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Catalog [
<!ELEMENT Catalog (Movie+)>
<!ELEMENT Movie (Title,Year,Length,TopBilledActors)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Year (#PCDATA)>
<!ELEMENT Length (#PCDATA)>
<!ELEMENT TopBilledActors (#PCDATA)>
<!ATTLIST Movie movieID ID #REQUIRED>
<!ATTLIST Movie genre (Drama|Fantasy|Action|Comedy) #REQUIRED>
<!ATTLIST Movie earningsrank CDATA #IMPLIED>
]>
<Catalog>
<Movie movieID="a123" genre="Drama">
<Title></Title>
<Year></Year>
<Length></Length>
<TopBilledActors></TopBilledActors>
</Movie></Catalog>