Create a document based on a template

Hi,
I want to create a word document based on a template doc using aspose.words.
How can I create that if anybody can help me out.
The template doc is attached herewidth.
Suchira

Hi
Thanks for your inquiry. I think, the best way to achieve this is using Mail Merge feature. Please see the following link for more information:
https://docs.aspose.com/words/net/types-of-mail-merge-operations/
Also, see the following link to learn how to prepare template:
https://docs.aspose.com/words/net/mail-merge-template/
Best regards,

Hi,
I have looked in the links.
My requirement is I need to store data from xml into the merge fields of the template doc at runtime.
How can i do that in Java.
I have looked into examples where methods are given in .Net but couldnt find anything in Java.
Suchira

Hi
Thanks for your inquiry. You can use IMailMergeDatasourse in this case. Please see the following link for more information:
https://reference.aspose.com/words/net/aspose.words.mailmerging/imailmergedatasource/
In java, you can read XML, for example like described here:
http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
Hope this helps.
Best regards.

Hi,
Thanks I have been able to store data from xml into the mail merge fields of word doc .
Regards
Suchira