通过文档类型声明包含或指向的标记声明必须有良好的成形 [英] The markup declarations contained or pointed to by the document type declaration must be well-formed
本文介绍了通过文档类型声明包含或指向的标记声明必须有良好的成形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经写了一个XML,但在XMLon第一行,我得到一个错误
I have written one XML, but in that XMLon very first line I am getting an error
包含或指向标记声明的文档类型
必须有良好的成形声明
The markup declarations contained or pointed to by the document type declaration must be well-formed
是XML(尖括号后的空间是故意的)
below is that XML (space after angular brackets is intentional)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apche.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="getTutorial" class="org.koushik.javabrains.action.TutorialAction">
<result name="success">/success.jsp</result>
<result name="error">/error.jsp</result>
</action>
</package>
</struts>
第一行(&LT;?XML版本=1.0编码=UTF-8&GT;
)抛出错误
请让我知道为什么我打这个问题。
Please let me know why I am hitting this issue.
推荐答案
我想这是因为之间的&LT多余的空间;
和? XML
之间
和&GT;
I guess this is because of the extra spaces between <
and ?xml
and between ?
and >
.
请注意,你似乎也有在开始和doctype声明的末尾多余的空格。
Note that you also seem to have extra spaces at the begin and end of the doctype declaration.
这篇关于通过文档类型声明包含或指向的标记声明必须有良好的成形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文