Tim's PHP Scripts
Extract XML files from a Word DOCX document
(docxtoxml)
Word 'DOCX' files are actually a number of XML files contained in a zipped file/folder.
PHP 5 or greater is needed. Will work on PHP 8.2 or later.
Features
This php class will take a DOCX type Word document and extract all the XML files in it. They will then all be saved in a directory with the same name as the original DOCX file. This directory will be automatically created if it does not exist. In the normal mode this class will not provide any output to screen.
The latest version of this script (v.1.0.2) can be downloaded from either:-
Github - https://github.com/timy352/docxtoxml
PHP Classes - https://www.phpclasses.org/package/12264-PHP-Extract-XML-files-from-Microsoft-Word-DOCX-files.html