Can you please give me a sample coding for creating /customXml/item1.xml through coding?
I tried to create using createDocxWithCustomXml.java as given in docx4j.2.6.0 version. since it returns null document in createCustomXmlDocument method, there is no customXML found in the document. I’ve attached the document.
I tried to return a document in createCustomXmlDocument method using following code
public static Document createCustomXmlDocument(Document document)
Element root = document.createElement("root");
But it returns null pointer exception. The return type Document is of type org.w3c.dom.Document, since customXmlDataStorage.setDocument() supports either org.w3c.dom.Document or InputStream. I tried with org.w3c.dom.Document
As I’m working with a project, I need to complete this urgently.
Pls do favor. please the see the attached document below. it doesn contain any injected cuxtomXml.