Tech Head Brothers new authoring tool, step 2
Today I had the time to go on a bit with the new version of Tech Head Brothers, as you can see on the picture.
I decided to use my last article as a test case for the tool.
I went from the Ribbon (Visual Editor) to Ribbon (XML), it is not anymore grahical edition of the Ribbon but I can do more than what I was able to do in the Visual Editor.
I started to implement some parsing logic, I first made a trial with an idea of Sébastien Ros and Fabien Reinle but finally got back to LINQ to XML to parse the WordML.
The general idea is to output a well formed XML document out of the WordML document.
The architecture I decided to use at the moment is to have special Word styles mapped to some part of my target XML structure. Doing so I can easily parse the WordML like this to get all pagaraph with Heading1 style:
var sections =
from p in styledPara
where p.Elements(w + “pPr”).Elements(w + “pStyle”).First().Attribute(w + “val”).Value == “Heading1”
select p;