Hello,
I'm trying to modify some text in the header using the fresh ocx4j 2.7 release with method getJAXBNodesViaXPath
However I receive the following exception:
Exception in thread "main" java.lang.NullPointerException
at org.docx4j.XmlUtils.getJAXBNodesViaXPath(XmlUtils.java:863)
at org.docx4j.openpackaging.parts.WordprocessingML.HeaderPart.getJAXBNodesViaXPath(HeaderPart.java:119)
at jax4cTestReplace.main(jax4cTestReplace.java:44)
Does anybody know how to fix it?
Following my code
public class jax4cTestReplace {
private static final String XPATH_SDT = "//w:sdt/w:sdtContent";
public static void main(final String[] args) throws IOException, Docx4JException, JAXBException
{
File inputfilepath = new File(args[0]);
File ...