编写xml文件时,The markup in the document preceding the root element must be well-formed.等bug

今天写dtd,xml文件时,连续报bug。
The markup in the document preceding the root element must be well-formed.
错误原因:ELEMENT 写成ElEMENT。
另外:xml区分大小写。

<!DOCTYPE poem system "poem1.dtd" >
<!doctype poem SYSTEM "poem1.dtd" >
<!DOCTYPE poem SYSTEM "poem1.dtd" >

以上声明时大小写都ok。但是ELEMENT要大写。
但这只是表象
如果一旦你写错了,只有

<!DOCTYPE poem SYSTEM "poem1.dtd" >

才会报错。


版权声明:本文为chaplinlong原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。