This Word 2007 document is crafted around embedded custom XML data, which is displayed and edited using Word 2007. In short: to do the above exercise, you just need to strip out the custom XML and you're done.
Stripping out the custom XML is also quite easy. First, locate the main relationships part in the OpenXML package. Then, search it for the main document part. From there, loop over the relationships to this document part and look for any relationship of the type "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml". When that one's found, you just need to parse the referenced document and you're done!
Want to see a demo? Check this out.
Want the sample code? 2007HealthCareSamplePHP.zip (49.76 kb)
Want the OpenXML background? Read the original article.
This is an imported post. It was imported from my old blog using an automated tool and may contain formatting errors and/or broken images.