DocumentBuilder is a part of the PowerTools for Open XML project that enables developers to shred and combine Open XML documents in a variety of ways. DocumentBuilder 2.0, released on June 20, 2011, is a significant upgrade that increases robustness - it handles a variety of cases that the first version could not handle, including images and diagrams in headers, footers, and comments. It also handles external references correctly.
Update Oct 25, 2011 - Release of DcumentBuilder 2.2 - includes bug fix for numbered items. Version number change syncs with PowerTools for Open XML 2.2. All of the screen-casts that refer to DocumentBuilder 2.0 are relevant to DocumentBuilder 2.2.
This page contains a summary of all content about DocumentBuilder 2.2. Over the next two months, I will be writing a number of blog posts and articles about DocumentBuilder 2.0. This page will be the main place where developers can go to learn about DocumentBuilder 2.2.
Download DocumentBuilder 2.2 from CodePlex.com
Download DocumentBuilder-2-2.zip, which you can find in the Downloads tab in the project on CodePlex.
Seven minute screen-cast that introduces DocumentBuilder 2.0.
Watch this first.
New Version of DocumentBuilder Available in PowerTools
Introduces DocumentBuilder 2.0
Introduction to DocumentBuilder 2.0 - Screen-Cast 1 of 3
Demonstrates downloading and running DocumentBuilder 2.0. Walks through one scenario around interrelated markup, and shows how DocumentBuilder 2.0 solves the issues around interrelated markup associated with that scenario.
Introduction to DocumentBuilder 2.0 - Screen-Cast 2 of 3
Builds on the previous screen-cast - in this screen-cast, I paste an image into a comment, walk through the markup, and show how DocumentBuilder deals with this situation of interrelated markup.
Introduction to DocumentBuilder 2.0 - Screen-Cast 3 of 3
In this screen-cast, I walk through the code, show how a major portion of DocumentBuilder 2.0 is data-driven, which makes it more robust. In addition, I explain some of the finer points about how DocumentBuilder 2.0 works.
Advanced DocumentBuilder - import a document into a cell in a table, into a text box, or into a content control.
In this screen-cast, I show a new way to develop using DocumentBuilder 2.0. You can use DocumentBuilder 2.0 to import a WordprocessingML document into any location that can contain block-level content (cells, text boxes, content controls).
Fine-grained control when importing content using DocumentBuilder.
Here, I show how you can import little bits of content from one document into a very specific place in another document. The specific scenario that I work through is to import the contents of a cell in a table in one document into a cell in a table in another document.
Using DocumentBuilder with Numbered Documents
DocumentBuilder enables you to merge multiple Open XML WordprocessingML documents into a single document. Sometimes you want to use DocumentBuilder to merge documents that contain numbered lists. By default, DocumentBuilder will bring each numbered list into the newly merged document as its own numbered list, but if you want content from multiple documents to be part of the same list after merging, then you need to do some extra work. This video shows how.
Splits documents at section breaks using Split-OpenXmlDocument, which is implemented using DocumentBuilder.
Explores Split-OpenXmlDocument and Merge-OpenXmlDocument
Shows an interesting use of Split-OpenXmlDocument and Merge-OpenXmlDocument, both of which are implemented using DocumentBuilder.