In your sample docx, here is what a typical paragraph looks like:
Using xml Syntax Highlighting
<w:p w14:paraId="3FE8CFD8" w14:textId="441F448C" w:rsidR="00EE1C4D" w:rsidRDefault="00EE1C4D" w:rsidP="00EE1C4D">
<w:pPr>
<w:pStyle w:val="Heading1"/>
</w:pPr>
<w:r>
<w:t>Text of Heading 1
</w:t>
</w:r>
</w:p>
Parsed in 0.001 seconds, using
GeSHi 1.0.8.4
In other words, none of the paragraphs contain outlineLvl as direct formatting.
It is however, set in the styles (ie styles part), for example:
Using xml Syntax Highlighting
<w:style w:type="paragraph" w:styleId="Heading1">
<w:name w:val="heading 1"/>
<w:basedOn w:val="Normal"/>
<w:next w:val="Normal"/>
<w:link w:val="Heading1Char"/>
<w:uiPriority w:val="9"/>
<w:qFormat/>
<w:rsid w:val="00EE1C4D"/>
<w:pPr>
<w:keepNext/>
<w:keepLines/>
<w:spacing w:before="240" w:after="0"/>
<w:outlineLvl w:val="0"/>
</w:pPr>
<w:rPr>
<w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi"/>
<w:color w:val="2F5496" w:themeColor="accent1" w:themeShade="BF"/>
<w:sz w:val="32"/>
<w:szCs w:val="32"/>
</w:rPr>
</w:style>
Parsed in 0.002 seconds, using
GeSHi 1.0.8.4
So what you need is a paragraph's effective properties. To get them, see
https://github.com/plutext/docx4j/blob/ ... .java#L345