1
我创建了一个非常简单的xml文件来存储高分,但validome.org说它是无效的,我不明白为什么。Xml vaildation失败
下面是XML文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HighScoreList [
<!ELEMENT HighScoreList (Highscore*)>
<!ELEMENT HighScore (Name, Score)>
<!ELEMENT Name (#PCDATA)>
<!ELEMENT Score (#PCDATA)>
]>
<HighScoreList>
<HighScore>
<Name>Player</Name>
<Score>1000</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>900</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>800</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>700</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>600</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>500</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>400</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>300</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>200</Score>
</HighScore>
<HighScore>
<Name>Player</Name>
<Score>100</Score>
</HighScore>
</HighScoreList>
和错误(在最后一行):元素类型的
内容 “HighScoreList” 必须匹配 “(排行榜*)”。