<w
>.....<w
>
<w
w:rsidR="00C72E37" w:rsidRDefault="00A27CF8" w:rsidP="00A27CF8">
<w
Pr>
<w
Style w:val="Description"/>
</w
Pr>
<w:r w:rsidRPr="00686C21">
<w:rPr>
<w:rStyle w:val="Habit"/>
</w:rPr>
<w:t>Trees, shrubs, lianas or herbaceous vines</w:t>
</w:r>
<w
w:rsidR="00C72E37" w:rsidRDefault="00A27CF8">
<w
Pr>
<w:ind w:right="19"/>
</w
Pr>
<w:r>
<w:rPr>
.......
</w:rPr>
</w:r>
<w:r w:rsidRPr="00A27CF8">
<w:rPr>
<w:rStyle w:val="Family"/>
</w:rPr>
<w:t>SAPINDACEAE</w:t>
</w:r>
<w:r>
<w:rPr>
......
</w:rPr>
</w:r>
</w
>
<w
>.....<w
>
<w
>.....<w
>
I need to loop through every <w
> of the document
First need to find out it’s child <w
Pr> has child <w
Style> that contain w:val and get its value and <w:t>Trees, shrubs, lianas or herbaceous vines</w:t>
Then look at <w
>’s other <w:r> children and find out if it’s any of child has
<w:rStyle w:val="name"/> and get it’s value and <w:t>SAPINDACEAE</w:t> value
So the result in key value dictionary
Style=” Description” : Text = “ Description”
Style = “Habit” : Text= ” Trees, shrubs, lianas or herbaceous vines”
Style= “Family” : Text = “SAPINDACEAE”
I’m using openxml document xdoument I need to find it's every style and their content from every <w
>
And their text value
If some you know better way then please help me
<w
<w
<w
</w
<w:r w:rsidRPr="00686C21">
<w:rPr>
<w:rStyle w:val="Habit"/>
</w:rPr>
<w:t>Trees, shrubs, lianas or herbaceous vines</w:t>
</w:r>
<w
<w
<w:ind w:right="19"/>
</w
<w:r>
<w:rPr>
.......
</w:rPr>
</w:r>
<w:r w:rsidRPr="00A27CF8">
<w:rPr>
<w:rStyle w:val="Family"/>
</w:rPr>
<w:t>SAPINDACEAE</w:t>
</w:r>
<w:r>
<w:rPr>
......
</w:rPr>
</w:r>
</w
<w
<w
I need to loop through every <w
First need to find out it’s child <w
Then look at <w
<w:rStyle w:val="name"/> and get it’s value and <w:t>SAPINDACEAE</w:t> value
So the result in key value dictionary
Style=” Description” : Text = “ Description”
Style = “Habit” : Text= ” Trees, shrubs, lianas or herbaceous vines”
Style= “Family” : Text = “SAPINDACEAE”
I’m using openxml document xdoument I need to find it's every style and their content from every <w
And their text value
If some you know better way then please help me