In InDesign, it is possible to export not only as PDF but also in an XML format called IDML. I used to use this to export files as IDML and clean up their contents whenever an INDD file became ...