Compartilhar via


Tutorial: Manipulating Content in a WordprocessingML Document

This tutorial shows how to apply the functional transformational approach and LINQ to XML to manipulate XML documents. The C# and Visual Basic examples query and manipulate information in Office Open XML WordprocessingML documents that are saved by Microsoft Word.

For more information, see the OpenXML Developer Web site.

In This Section

Topic

Description

Shape of WordprocessingML Documents

Provides a quick explanation of details of a WordprocessingML document.

Creating the Source Office Open XML Document

Provides step-by-step instructions to create the source document for queries in this tutorial.

Finding the Default Paragraph Style

Shows a query to find the name of the default style for a document.

Retrieving the Paragraphs and Their Styles

Shows a query that retrieves a collection of the paragraphs of a document.

Retrieving the Text of the Paragraphs

Augments the previous query to retrieve the text of each paragraph.

Refactoring Using an Extension Method

Simplifies the code by refactoring using an extension method.

Refactoring Using a Pure Function

Further simplifies the code by refactoring using a pure function.

Projecting XML in a Different Shape

Completes an XML transformation by projecting XML in a different shape than the original document.

Finding Text in Word Documents

Uses the previous queries to find a specified text string in a document.

Details of Office Open XML WordprocessingML Documents

Provides some details of Office Open XML WordprocessingML documents.

See Also

Concepts

Introduction to Pure Functional Transformations

Other Resources

Pure Functional Transformations of XML