How to bind custom xml to docx with nested repeats
Posted: Tue Mar 15, 2011 5:51 am
Hi,
I need to create a docx document from my object model programmatically. Document should contain a lot of similar sections, subsections and items.
To do this I can marshall all object model to xml and than as I understand I can populate docx from my custom xml using some rules of repeats and conditions.
What main steps should I do to achieve that? I've tries some examples from samples package, but most connected to custom xml binding do not work as I expect (for example generated invoice.docx doesn't show all invoice items, just first one).
It would be great if it is possible to define some docx template with styles, fonts I want and populate data basing on this template. Is it possible from docx4j?
Thanks in advance
Anton
I need to create a docx document from my object model programmatically. Document should contain a lot of similar sections, subsections and items.
To do this I can marshall all object model to xml and than as I understand I can populate docx from my custom xml using some rules of repeats and conditions.
What main steps should I do to achieve that? I've tries some examples from samples package, but most connected to custom xml binding do not work as I expect (for example generated invoice.docx doesn't show all invoice items, just first one).
It would be great if it is possible to define some docx template with styles, fonts I want and populate data basing on this template. Is it possible from docx4j?
Thanks in advance
Anton