Parsing an Open XML doc via styled blocks
Posted
by Chris B. Behrens
on Stack Overflow
See other posts from Stack Overflow
or by Chris B. Behrens
Published on 2010-04-20T14:04:46Z
Indexed on
2010/04/20
22:53 UTC
Read the original article
Hit count: 253
I'm working with docx docs, and I need to parse a document into sections on the basis of headings styled with the "heading 1" style. So if I had a doc like this (markup is pseudocode):
<doc>
<title style>Doc Title</title style>
<heading1>First Section</heading1>
...
<heading2>Second Section</heading2>
...
<heading3>Third Section</heading3>
...
</doc>
I'd want to break this into a doc with four sections, the first being the content that precedes the first section. I figure that this is probably pretty simple once you're familiar with Open XML, but I am not.
TIA.
© Stack Overflow or respective owner