I'm developing a solution that allows people to upload a DOCX file as a template. This template is used for generating Word documents with database info.
What I would like to do is once a template gets uploaded, to check it for errors. (I don't want my parser crashing when a template is used.)
I've seen the question about checking a signature of a Word template, but that isn't enough to validate the integrity of the file. Of course it is possible to try to unzip the file, validate the XML in there, and so on, but this is rather CPU intensive and I'd like a different approach if there is one.
Are there any solutions that are part of the Open XML SDK or other standard approaches to this? Any ideas are apreciated.