This is XML being injected
- Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:case xmlns:ns2="http://gctrack.gao.gov/templates/case-data">
<documentId>118905</documentId>
<fileNumber>408694</fileNumber>
<caseNumber>9</caseNumber>
this is the snippet of code
- Code: Select all
// xmlDocument is created by JAXB marshalling of my data class to Document
//created using docx4j org.docx4j.XmlUtils#neww3cDomDocument
wordMLPackage = Docx4J.load(new File(targetPath, "case-data-elements-inventory.docx"));
Docx4J.bind(wordMLPackage, xmlDocument, Docx4J.FLAG_BIND_INSERT_XML +
Docx4J.FLAG_BIND_BIND_XML + Docx4J.FLAG_BIND_REMOVE_SDT);
Here is the exception in 3.3.2 which I did not have in 3.3.0
Exception in thread "main" org.docx4j.openpackaging.exceptions.Docx4JException: Problems applying bindings
at org.docx4j.model.datastorage.BindingTraverserXSLT.traverseToBind(BindingTraverserXSLT.java:188)
at ...