试图理解XML解析错误(由MS Word引起)

时间:2017-12-20 09:46:29

标签: xml ms-word

我的同事正在编写一个单词文档,该文档因“错误根据架构”或类似错误而导致损坏。我查看了Notepad ++中的document.xml文件并对其进行了验证,并给出了错误XML Parsing error at line 316366: Premature end of data in tag document line 2。这是第2行:

 <w:document> xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"   
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

这是第316366行:

</w:document>

这是文件的结尾。这有什么不对?它看起来因为标签关闭了。

1 个答案:

答案 0 :(得分:2)

第2行应该是

<w:document
    xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas"   
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">

即。将>移到最后。