This error is caused by the DTD file not being valid. You have most likely created a DTD-file containing:
<!DOCTYPE…. [
...
]>
Simply remove the first and last line delcaring the DTD data, since those are only to be used when having the DTD within your XML file.