We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Content control data binding in docx

Hello, perhaps someone can answer this inquiry. I am working on a project right now using docx4j to insert a customXML document part into a docx that has data bound content controls. Does Aspose support this kind of feature? We have software that is generating user information into an XML document, and would like a way to generate docx based off of this data. This is currently working with docx4j, but the data in the content controls lose all style/formatting and so I am looking for alternatives.

The nice feature of docx4j is that for fields that are repeated in a document such as “An employee may have 1 or many addresses” is addressed with a repeat binding scheme for the content controls. I dont have to programmatically do anything other than run a “process bindings” method which does all heavy lifting to implement this feature.

Will Aspose.word satisfy my requirements for such a tool to generate docx files based off XML documents?

Hi Derek,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your interest in Aspose.Words. Maybe, in your case it would be easier to use mail merge to fill your document with data from XML file. Please follow the link to learn more about mail merge:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/mail-merge-and-reporting.html

You can use IMailMergeDatasource to fill mergefields from XML file:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/imailmergedatasource.html

Hope such approach is acceptable for you. Please feel free to ask if you need more assistance, I will be glad to help you.

Best regards,

Actually a patch was released for docx4j and I think it finally solved my problem. Thanks for the reply.