![](/img/trans.png)
[英]The element type "tag" must be terminated by the matching end-tag "</tag>"
[英]The element type X must be terminated by the matching end-tag
我正在為 dredmor 地牢制作一個 mod。 當我通過語法檢查器或格式化程序運行代碼時,出現此錯誤:
無法解析任何 XML 輸入。 第 6 行錯誤:元素類型“skillDB”必須由匹配的結束標記“
</skillDB>
”終止。
這是我的 XML:
<skillDB>
<skill name="Gamblemancy" skillName="Gamblemancer" type="wizard"
description="The magic of the felt. Will you heal your enemies? Hurt yourself? It's up to the dice! Or cards. Or slot machine"/>
<art icon="\sprites\fillersprite.png" />
<loadout type="booze" subtype="Deck Of Cards" />
</skill>
<ability>
<name="Gamblemancy" icon="\sprites\fillersprite.png skillName="Gamblemancer" startSkill="1"
description="You are a gamblemancer! A holder of ultimate luck! And Debt!"/>
<primarybuff id="5" amount="2" />
<secondarybuff id="5" amount="2" />
</ability>
<ability>
<name="Luck of the draw" icon="\sprites\fillersprite.png" skillName="Gamblemancer" level="0"
description text="Pure luck courses through your veins! Except when it doesn't." />
<criticalBuff percentage="90" name="Lucky shot" />
</ability>
<ability>
<name="Royal flush" icon="\sprites\fillersprite.png skillName="Gamblemancer" level="1"
description text="Royal Flush! You win! Except that you don't!" />
<spell name="Royal Flush" />
</ability>
<skill skillName="Another skill tree's name">
<!--This is where some basic information about the skill tree goes-->
</skill>
<ability skillName="Another skill tree's name" startSkill="1">
<!--This is where the first level of the skill tree goes-->
</ability>
<ability skillName="Another skill tree's name" level="0">
<!--This is where the second level of the skill tree goes-->
</ability>
<ability skillName="Another skill tree's name" level="1">
<!--This is where the third level of the skill tree goes-->
</ability>
</skillDB>
您的 XML 有幾個語法問題,包括:
第一個skill
元素有一個自閉合的開始標簽和一個結束標簽。 刪除/
字符:
<skill name="Gamblemancy" skillName="Gamblemancer" type="wizard" description="The magic of the felt. Will you heal your enemies? Hurt yourself? It's up to the dice! Or cards. Or slot machine"/> ^
或刪除結束標簽:
</skill>
<name="Gamblemancy" 缺少標簽名稱。
屬性值缺少右引號。
太多了,如果沒有 XML 模式或樣本已知的有效文檔實例,就很難知道如何修復。 這是一種至少格式良好的可能性:
<skillDB>
<skill name="Gamblemancy" skillName="Gamblemancer" type="wizard"
description="The magic of the felt. Will you heal your enemies? Hurt yourself? It's up to the dice! Or cards. Or slot machine">
<art icon="\sprites\fillersprite.png"/>
<loadout type="booze" subtype="Deck Of Cards"/>
<ability>
<NEEDTAG name="Gamblemancy" icon="\sprites\fillersprite.png" skillName="Gamblemancer" startSkill="1"
description="You are a gamblemancer! A holder of ultimate luck! And Debt!"/>
<primarybuff id="5" amount="2" />
<secondarybuff id="5" amount="2" />
</ability>
<ability>
<NEEDTAG name="Luck of the draw" icon="\sprites\fillersprite.png" skillName="Gamblemancer" level="0"
description="Pure luck courses through your veins! Except when it doesn't." />
<criticalBuff percentage="90" name="Lucky shot" />
</ability>
<ability>
<NEEDTAG name="Royal flush" icon="\sprites\fillersprite.png" skillName="Gamblemancer" level="1"
description="Royal Flush! You win! Except that you don't!" />
<spell name="Royal Flush" />
</ability>
</skill>
<skill skillName="Another skill tree's name">
<!--This is where some basic information about the skill tree goes-->
</skill>
<ability skillName="Another skill tree's name" startSkill="1">
<!--This is where the first level of the skill tree goes-->
</ability>
<ability skillName="Another skill tree's name" level="0">
<!--This is where the second level of the skill tree goes-->
</ability>
<ability skillName="Another skill tree's name" level="1">
<!--This is where the third level of the skill tree goes-->
</ability>
</skillDB>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.