1
私は高スコアを格納するための非常に単純なxmlファイルを作成しましたが、validome.orgはそれが有効ではないと言い、理由を理解できません。ここでXml vaildation fail
は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" "(ハイスコア*)" を一致させる必要があります。