I recently discovered after trying to import WordPress XML files for a customer that you can use xmllint (within the Command Line or iTerm) to check the validity of the files.
The error message looked like this:
Invalid XML on read in WXR_Large_File_Parser::__construct() for file:///nfs/6a2/156107206/files/2019/01/site-address-here.wordpress.2019-01-09.001.xml_-3.txt (size: 11335507)
After a colleague suggested xmllint, I opened iTerm (equivalent to the Command Line), then made sure to change the directory to where the file were located. For example:
/cd ~/Desktop
xmllint --valid filename.xml
Two files were checked and one of the files produced the following error:

If anyone can translate the error messages (from the screenshot), please let me know!
In the end, I tried the import file again but decided to split the first file 11.3 MB using a WXR splitter and all files were successfully imported. 🎉 🤓
You must be logged in to post a comment.