This time I will create a word document (open xml) in F# without using the Open XML SDK and using XML libraries. Things have been intentionally kept simple.
I start by modelling a simple word document:
There are Two types of paragraphs: normal and bold ones:
And a document is a list of paragraphs:
This is the test:
Next we have the to create an xml version of document:
Then we have to create a package, add the document and save it to disk:
This is the result:
I have created a map from twitter to my document model
(the details of the twitter part can be found at: http://blogs.msdn.com/b/dsyme/archive/2010/01/10/async-and-parallel-design-patterns-in-f-reporting-progress-with-events-plus-twitter-sample.aspx)
This results in the following document:
Remark: I had to Google “Weiner” to understand the jokes.