One among the errors encountered by Microsoft Word users is the XML Parsing Error when they try to open a Word Document. This error is seen after an upgrade of the Office version or if the document is exported.
The error message says that “We cant open filename.docx because we found a problem with its contents”. When you check the details of the error it says XML Parsing Error and gives the location of the error (Part, Line, and Column) indicating where we can look in the document for resolving the error. Generally, this error is caused by encoding errors in the XML file (that is part of the document) which Word is not able to interpret. Here we will discuss the method of resolving this error using Notepad++ and Winrar/Winzip.
Fix Using Notepad++ and Winrar or Winzip
The .docx file is a .zip file containing a number of .xml files so this error indicates a location in one of the .xml files.
1. Select the Word document showing the error and press F2 to change the file extension.
2. Now change the extension from .docx to .zip.
3. Click on Yes in the dialog asking for a confirmation of the extension change.
4. If extensions are not visible, go to the View tab in File Explorer and check the box next to File name extensions.
5. Double-click on the file converted to .zip. You will see a number of files that are a part of the word document.
6. From the location in the error message identify the file causing the error. Extract this XML file outside the zip archive.
7. Now we will edit the file using Notepad++. Click on this link to download Notepad++ if you don’t have it installed on your PC.
8. Right-click on the extracted XML file and select Edit with Notepad++.
9. To view correct lines and columns you need to install the XML Tools plugin.
10. Go to the Plugins menu at the top.
11. Select Plugins Admin in the menu that appears.
12. In the Plugins Admin, go to the Available tab.
13. Look for XML Tools Plugin in the list and select it. Click on the Install button.
14. In the confirmation window, click on Yes to quit so that installation happens and then restart Notepad++.
15. Once the Plugin is installed, go to Plugins –> XML Tools.
16. Select Pretty Print to format the file.
17. In the formatted file, go to the location mentioned in the error. This error will differ between files. Look for inconsistencies like special characters not enclosed in a code block and unusually formatted links and code. In such cases, you will see an exclamation point next to the line.
18. After resolving the error, press Ctrl + S to save this file. Copy and paste it back into the .zip file.
19. Now rename the file to .docx or .doc and try opening it again.
If you are able to open the Word document without any XML parsing issues it means the error is fixed.
Thanks for reading.
Comment and let us know whether this method worked for you in resolving the XML Parsing error.
Thank you! You saved me! Very clear instructions!