I am almost new to the docx4j , now i have a problem , i get the document.xml contents by
- Code: Select all
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
String xmlContent= documentPart.getXML();
after i do lots of modifications to the xml String like complex content replacement , refresh some datas, i want to convert this modified xml String back into a docx file, something like replacing the old document.xml with my new xml content and finally export it out. i have gone some examples in github ,but no idea how to implement it. i can't directly use the variableReplace() because some replacement depending on client's requirement is so complex with lots of conditions . does anyone know how to merge the xml String back ? thks
