Archive for August, 2016

Introducing WmlComparer, a Module in Open-Xml-PowerTools

WmlComparer compares two Open XML documents, producing a new document that contains the precise differences in revision tracking markup. You can then iterate through those differences.

This module contains my latest thinking on how to process large documents character-by-character. The module converts the DOCX into a new form – an array – where every item in the array is a single piece of content, whether it be a character in a paragraph, the paragraph mark itself, an image, and so on. This thinking will go into the next version of OpenXmlRegex, so that it will be possible to include new lines in the search string, as well as replace matched strings with content that contains new lines.

This module is extremely useful when writing XUnit tests for code that processes Open XML markup – we can test that the code produced the exact document that we intended.

Comments (5)