in reply to docx to txt

For what it’s worth, the XML format used in a DOCX file is thoroughly documented by Microsoft, and there is a DTD as well.   (I rather think that some guv’mint along the way must have read them the “no more proprietary document formats for public documents” riot-act... which would have been a good thing.   I know the Library of Congress has been very outspoken about that.)