Hello,
first of all thanks to the developers. Docx4j is getting a great and easy tool to work with OpenXML.
I am trying to replace some text fields and am using your demo:
public static void main(String[] args) {
File f = new File("test.docx");
WordprocessingMLPackage wd;
try {
// 1. Load the Package
wd = WordprocessingMLPackage.load(f);
// 2. Fetch the document part
MainDocumentPart docPart = wd.getMainDocumentPart();
org.docx4j.wml.Document wmlDocumentEl = (org.docx4j.wml.Document)docPart.getJaxbElement();
Body body = wmlDocumentEl.getBody(); ...