I would like to tag each component in a Word document and then be able to find it and set the value using docx4j.
Example xml generated by MS Word:
- Code: Select all
<w:p w:rsidR="006E5C2E" w:rsidRDefault="008F3BB7" w:rsidP="00685763">
<w:sdt>
<w:sdtPr>
<w:tag w:val="checkbox.two" />
<w:id w:val="-1510903451" />
<w14:checkbox>
<w14:checked w14:val="1" />
<w14:checkedState w14:val="2612" w14:font="MS Gothic" />
<w14:uncheckedState w14:val="2610" w14:font="MS Gothic" />
</w14:checkbox>
</w:sdtPr>
<w:sdtEndPr />
<w:sdtContent>
<w:r w:rsidR="00046DC2">
<w:rPr>
<w:rFonts w:ascii="MS Gothic" w:eastAsia="MS Gothic" w:hAnsi="MS Gothic" w:hint="eastAsia" />
</w:rPr>
<w:t>☒</w:t>
</w:r>
</w:sdtContent>
</w:sdt>
<w:r w:rsidR="0054722E">
<w:t xml:space="preserve"> </w:t>
</w:r>
<w:r w:rsidR="00685763">
<w:t>Checkbox Two</w:t>
</w:r>
</w:p>