解析片段xml时出错:意外的数据结束

时间:2018-05-16 10:41:34

标签: xml parsing code-snippets

<snippet>
    <content>
      <![CDATA[${1:type} ${2:name} (${3:void}){
               ${5}; return ${4:able};}]]>
    </content>
    <tabTrigger>f,fn,fct</tabTrigger>
    <description>decl funct<description>
    <scope>source.c99</scope>
</snippet>

在第12行的文件Packages / User / c99 / funct.sublime-snippet中解析片段xml:意外的数据结尾时出错

1 个答案:

答案 0 :(得分:0)

邮件中的结束标记<description>不好。将其修复为</description>

所以你的xml必须是:

<snippet>
    <content>
        <![CDATA[
    ${1:type} ${2:name} (${3:void})
    {
        ${5}
        return ${4:able};
    }
    ]]>
    </content>
    <tabTrigger>f,fn,fct</tabTrigger>
    <description>decl funct</description>
    <scope>source.c99</scope>
</snippet>