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」 必須匹配 「(排行榜*)」。