How do I see the XML of my DOCX document?

Solution 1:

It's a zipped file. Rename it ending in .zip to view it.

Solution 2:

Working on macOS, and don't want to install any software to see the XML from your .docx documents? Just open up the terminal and:

cd path/to/your/file.docx
unzip file.docx -d file-content

As mentioned above, .docx files are "disguised" zip files, and unzip is installed by default on macOS. After using it, your file-content folder will contain the various .xml files composing the Word document.

Solution 3:

I unpacked the zip file en edited the document.xml using Notepad++ (Plugins/XML tools/Check XML syntax now). Notepad++ noticed me at swapped elements, I placed the elements in a more logical order and repeated the steps until no more issues were found. Then I copied all the files directly into zip using Total Commander and finally renamed it back to *.docx. Word happily opened the file.

What I am saying is that if Word still refuses to open the file then there may be some more issues in one or more of xml files. Tip: use IE to quickly check an XML-file. If you see only flat text or even nothing at all, you can bet there is something wrong with the xml.