cannot put XML declaration in DTD?

M

Matt

For DTD, we cannot put XML declaration
<?xml version="1.0" encoding="UTF-8"?>. Is that correct? I tried
that and it will yield error "Cannot have a DTD declaration outside of a DTD."
But XML declaration is ok to put in XML and XSD.

Please advise. thanks!!
 
R

Richard Tobin

Matt said:
For DTD, we cannot put XML declaration
<?xml version="1.0" encoding="UTF-8"?>. Is that correct?

No. A DTD can have a XML declaration (technically a text declaration).

You'll need to post your whole file if you want someone to work out
what's wrong. Try it with some other parsers and see if you get a
more comprehensible error message.

-- Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,998
Messages
2,570,242
Members
46,834
Latest member
vina0631

Latest Threads

Top