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.

!!!

5 Comments »

  1. Jon Silberman said,

    November 21, 2016 @ 3:16 pm

    Eric,

    We are looking for some help with an open office XML problem in our development project.

    Can you give me a call or shoot me an email to discuss

    713 985 4620 … office phone — email is jon.silberman@naipartners.com

    Thanks

    Jon

  2. Jimmy said,

    March 20, 2018 @ 2:09 pm

    Hi Eric,

    Same for us here… We convert a simple document to html and the result for some reasons is not the same at all. Can you pls send me an email to forward more details?

    Thanks,

    Jim

  3. mayura said,

    August 14, 2018 @ 6:15 pm

    Hi Eric sorry I posted my question under this topic. But I didnt get a right way.
    I am using open xml for creating spreadsheet. I want to add checkbox in excel. Please can you help me for same. Working on this for long time.

  4. liuyi said,

    May 29, 2019 @ 8:13 am

    Hi Eric:
    I am a OpenXML user,I have some questions in creating a word doc using openXML,I try to create a table of contents in the doc file,but pages do not exist.Moreover,I want to create the table of contents after the cover but failed,the table of contents are created before the cover.Can you help me?
    Thanks,
    Liuyi

  5. Peter said,

    September 23, 2019 @ 9:23 pm

    Hi Eric,

    Question about this tool, Is it possible to take document B which contains track changes, and compare it to document A which is the source document for document B, and have it maintain the track changes that are in B and add any changes that were made to B with the “review” turned off?

    We were only able to get this to work in a mode where all changes to B are accepted, and then compared to A.

    Thanks.

RSS feed for comments on this post · TrackBack URI

Leave a Comment