- Code: Select all
<t>
- Code: Select all
xml:space="preserve"
Is it possible to set this attribute using docx4j?
If not, can you suggest any workaround I could use to enable me to set it, as I would find it very useful for ...
It is currently Wed Dec 03, 2025 2:11 pm
News of Forums<t>xml:space="preserve"WordprocessingMLPackage template = WordprocessingMLPackage.load(new ByteArrayInputStream(out.toByteArray()));
//start to do something on the template
....
//end
ByteArrayOutputStream outv = new ByteArrayOutputStream();
SaveToZipFile saver = new SaveToZipFile(template);
saver.save(outv);
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
String xmlContent= documentPart.getXML();Total posts 10213 • Total topics 2877 • Total members 2103