title: Apache POI - How to retrieve "rect" object inside "pict" object
body: <p>I am trying to convert a Word document to HTML using Apache POI. I have a Word document that has a horizontal line after a paragraph. The OOXML for the horizontal line looks like this:</p>
  
  <pre><code>          &lt;w:p w14:paraId="721E1052" w14:textId="05637367" w:rsidR="002D1248" w:rsidRPr="00BB3E82" w:rsidRDefault="00B3113F" w:rsidP="00797596"&gt;
              &lt;w:pPr&gt;
                &lt;w:rPr&gt;
                  &lt;w:rFonts w:eastAsia="Times New Roman" w:cs="Courier New"/&gt;
                  &lt;w:snapToGrid w:val="0"/&gt;
                  &lt;w:color w:val="000000"/&gt;
                  &lt;w:lang w:eastAsia="fi-FI"/&gt;
                &lt;/w:rPr&gt;
              &lt;/w:pPr&gt;
              &lt;w:r&gt;
                &lt;w:rPr&gt;
                  &lt;w:rFonts w:eastAsia="Times New Roman" w:cs="Courier New"/&gt;
                  &lt;w:snapToGrid w:val="0"/&gt;
                  &lt;w:color w:val="000000"/&gt;
                  &lt;w:lang w:eastAsia="fi-FI"/&gt;
                &lt;/w:rPr&gt;
                &lt;w:pict w14:anchorId="534EEFD0"&gt;
                  &lt;v:rect id="_x0000_i1025" style="width:0;height:1.5pt" o:hralign="center" o:hrstd="t" o:hr="t" fillcolor="#a0a0a0" stroked="f"/&gt;
                &lt;/w:pict&gt;
              &lt;/w:r&gt;
            &lt;/w:p&gt;
  </code></pre>
  
  <p>Corresponding to this horizontal line, I want to add a HR tag in HTML. However, I am not able to retrieve the "rect" element inside "pict". This is what I have tried so far:</p>
  
  <pre><code>List&lt;org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPicture&gt; pics = run.getCTR().getPictList();
          if(pics!=null) {
              log.debug("Size of pics = "+pics.size());
              for (org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPicture pic : pics) {
                  Node picNode = pic.getDomNode();
                  CTGroup ctGroup = CTGroup.Factory.parse(picNode);
                  if(ctGroup!=null) {
                      log.debug("Size of rects= "+ctGroup.getRectList().size());
                  }
              }
  
  </code></pre>
  
  <p>The above code gives:
  Size of pics = 1
  Size of rects= 0
  I am not sure why that is the case. Any help in understanding how to retrieve the "rect" object would be really appreciated. Thank you.</p>