I am using Docx4J to modify docx templates and put values in place of placeholders in the template that are predefined.
so far, i had been successful in finding and replacing paragraphs and texts, tables, images etc. But i am not yet successful in finding Header and/or Footer elements of the document.
I am using
WordprocessingMLPackage wordMLPackage =
WordprocessingMLPackage.load(new java.io.File(inputfilepath));
wordMLPackage.getMainDocumentPart();
to search for elements in the template.