cannot put XML declaration in DTD?

Matt (archive)

Usenet Archive
Joined
Jan 13, 2000
Messages
739
Reaction score
0
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!!
 

Richard Tobin

Usenet Archive
Joined
Jan 6, 2000
Messages
4,251
Reaction score
0
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

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top