docx4j JaxbValidationEventHandler openpackaging.parts.JaxbXmlPart
docx4j printed an exception(not throwed ) when just loading docx file . The program continued, but, it seems docx4j cann't handle ppr and rpr tags in /word/document.xml
test code:
- Code: Select all
public static void main(String[] args)throws Exception {
logger.info("size is {}", DocxUtil.getAllElementFromObject(docxTemplate.getMainDocumentPart(), PPr.class).size()); // returns 0!!
logger.info("size is {}", DocxUtil.getAllElementFromObject(docxTemplate.getMainDocumentPart(), RPr.class).size()); // returns 0!!
logger.info("size is {}", DocxUtil.getAllElementFromObject(docxTemplate.getMainDocumentPart(), Text.class).size());
logger.info("size is {}", DocxUtil.getAllElementFromObject(docxTemplate.getMainDocumentPart(), P.class).size());
logger.info("size is {}", DocxUtil.getAllElementFromObject(docxTemplate.getMainDocumentPart(), R.class).size());
}
system out :
...