docx4j icon indicating copy to clipboard operation
docx4j copied to clipboard

Parsing <w:strike w:val="off"/>, but BooleanDefaultTrue.isVal got true

Open will86 opened this issue 6 months ago • 0 comments

I am using docx4j V8.3.11 while I having the following xml

<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" > <w:body> <w:p> <w:r> <w:rPr> <w:rFonts w:ascii="Arial" w:eastAsia="Arial" w:hAnsi="Arial"/> <w:sz w:val="18"/> <w:szCs w:val="18"/> <w:b w:val="on"/> <w:i w:val="off"/> <w:strike w:val="off"/> <w:color w:val="000000"/> </w:rPr> <w:t>SIMPLE</w:t> </w:r> </w:p> </w:body> </w:document>

Simply, I tried to unmarshal the above xml to an object

String xml = "↑↑↑"; Object o = XmlUtils.unmarshalString(xml); System.out.println(o);

In the o document, the attribute I and strike was not null, and the method of isVal() within BooleanDefaultTrue returned true.

I don't think its right, So I want some help here.

SCR-20240731-ngeq

will86 avatar Jul 31 '24 06:07 will86