小编int*_*o5t的帖子

XML错误:文档末尾的额外内容

这是XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<name>Sample Document</name>
<type>document</type>
<url>http://nsc-component.webs.com/Office/Editor/new-doc.html?docname=New+Document&amp;titletype=Title&amp;fontsize=9&amp;fontface=Arial&amp;spacing=1.0&amp;text=&amp;wordcount3=0</url>
</document>

<document>
<name>Sample</name>
<type>document</type>
<url>http://nsc-component.webs.com/Office/Editor/new-doc.html?docname=New+Document&amp;titletype=Title&amp;fontsize=9&amp;fontface=Arial&amp;spacing=1.0&amp;text=&amp;</url>
</document>
Run Code Online (Sandbox Code Playgroud)

我打开它时说: This page contains the following errors: error on line 8 at column 1: Extra content at the end of the document

但只有这样:

<document>
<name>Sample</name>
<type>document</type>
<url>http://nsc-component.webs.com/Office/Editor/new-doc.html?docname=New+Document&amp;titletype=Title&amp;fontsize=9&amp;fontface=Arial&amp;spacing=1.0&amp;text=&amp;</url>
</document>
Run Code Online (Sandbox Code Playgroud)

没关系.为什么有两个这样说呢?

xml xml-parsing

21
推荐指数
2
解决办法
9万
查看次数

标签 统计

xml ×1

xml-parsing ×1