gpt4 book ai didi

xml - 元素类型X必须以匹配的结束标记终止

转载 作者:行者123 更新时间:2023-12-03 08:19:28 24 4
gpt4 key购买 nike

我正在为Dredmor的地下城制作Mod。通过语法检查器或格式化程序运行代码时,出现以下错误:

Unable to parse any XML input. Error on line 6: The element type "skillDB" must be terminated by the matching end-tag "</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>
  • 属性值缺少右引号。

  • 如果没有XML模式或已知有效的文档实例示例,那么很难知道如何修复。这是至少 well-formed的一种可能性:
    <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>

    关于xml - 元素类型X必须以匹配的结束标记终止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64756362/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com