The WordOpenXML in Word 2007 has a lot of data that changes without changing something in the text itself of the style.
Is there a way to compare two WordOpenXML chunks using the OpenXML sdk? Can this be done with some other method?
Much of what changes is often RSID attributes. RSID attributes are there to facilitate merging diverged documents. If you don't have the need to merge two diverged documents, you can always safely remove those RSID elements and attributes. You can use the MarkupSimplifier to help. Take a look at:
Follow on Twitter
Yes, that is what I needed. But, my problem with the entire OpenXML SDK, is that it needs a WordProcessingDocument, which is loaded from an existing document. I needed it to work with a Word Ranges, which have a WordOpenXML string representation and compare it with another one.
Is there a way I can use the same methods for Ranges, and not just documents?
The XML that you get from Word Ranges is in the Flat OPC format. This post contains boilerplate code to take Flat OPC and convert it, so that you can open it as a WordprocessingDocument, and either use the strongly typed SDK OM or use LINQ to XML.
There is an MSDN article, Using Open XML to Improve Automation Performance in Word 2010 for Large Amounts of Data, that contains a complete example.