Table Markup in Open XML SpreadsheetML

Tables are a feature in Open XML spreadsheets that allow you to interact with data more like a database.  You can select a region and convert it to a table.  Most Excel aficionados are familiar with this feature.  It is very useful. This blog is inactive.New blog: EricWhite.com/blog Blog TOC  In a previous post, Using…

2

Controlling Namespace Serialization of LINQ to XML

You can explicitly control how LINQ to XML serializes the namespaces for an XML tree.  You can control whether a namespace is serialized as the default namespace for a tree, or whether the namespace will use a prefix.  Namespace declarations look like attribute declarations, so to simplify the LINQ to XML tree, LINQ to XML…

0

Reducing Connaissance (Interconnectedness) and Increasing Robustness using LINQ

This is one in a series of posts on transforming Open XML WordprocessingML to XHtml.  You can find the complete list of posts here. Recently I went through the process of handling a variety of details in the XHtml converter – generating XHtml entities wherever possible, and making sure that whatever else, the XHtml converter doesn’t throw…

0

Serializing Encoded XML Documents using LINQ to XML

Writing encoded (utf-8, utf-16, etc.) documents using LINQ to XML is pretty straight-forward, but there is one interesting dynamic of the semantics.  When serializing to a file on disk, then you can set the encoding in the XML declaration, and the resulting XML document will be serialized as you wish.  However, if you are writing…

1

Convert XDocument to XmlDocument (and Convert XmlDocument to XDocument)

Some time ago, I blogged about an approach for converting an XElement object to an XmlNode object, and vice versa.  This is useful when you want to use a programming interface that takes and returns objects of type XmlNode, but you want to use the expressiveness and power of LINQ to XML for your code…

1

Transforming WordprocessingML to Simpler XML for Easier Processing

This is one in a series of posts on transforming Open XML WordprocessingML to XHtml.  You can find the complete list of posts here. When building a document processing system based on Open XML WordprocessingML, one approach to making your software system more robust is to use a technique where you make use of WordprocessingML style information…

1

ListItemRetriever: Accurately Retrieving Text of a Open XML WordprocessingML Paragraph

When you are retrieving the text of an Open XML WordprocessingML paragraph, it is often pretty important to retrieve the text of a list item.  This was especially true for the WordprocessingML => XHtml transform.  This post introduces the ListItemRetriever class, which implements one aspect of the functionality in HtmlConverter to retrieve the entire text…

0

Rollup Extension Method: Create Running Totals using LINQ to Objects

Recently, I had need for a new extension method for IEnumerable<T>, which I call “Rollup”.  This extension method is sort of a cross between the Select and Aggregate extension methods.  Like Select, when using this extension method you write a lambda expression to project the new value in a new collection.  Unlike Select, in the…

2

Writing Entity References using LINQ to XML

I need to write out some XHtml, and in several places, I want that XHtml to contain entities references.  However, you can’t simply write the entity reference like this: This is one in a series of posts on transforming Open XML WordprocessingML to XHtml.  You can find the complete list of posts here. This blog is inactive.New…

2

Working with Numbering in Open XML WordprocessingML

When implementing a conversion of Open XML word processing documents to HTML, one of the interesting issues is accurately converting numbered and bulleted lists.  You must pay special attention to them, because they impact the text that the document contains, but that text isn’t directly in the markup.  If you are accurately extracting the text…

3