Merge DOC with XML as DataSource

I have to merge my document with an XML File,

like that in .NET

// Create the Dataset and read the XML.
DataSet customersDs = new DataSet();
customersDs.ReadXml(dataDir + "Customers.xml");

i have an XML File representing my DOCUMENTO MODEL with a lot of single merge fields but also with a lot of tables and nasted tables.

What is the best practice to do for me?

thx
Michael

Hi Michael,

Thanks for your inquiry. I would suggest you please read the following articles:

https://docs.aspose.com/words/net/mail-merge-with-xml-data-source/
https://docs.aspose.com/words/net/nested-mail-merge-with-regions/

Please let me know if I can be of any further assistance.

Best Regards,

Thx for your reply…

I found already this post but does it works also for Java???

there are no readXML or anything else in DataSet for Java!

can you help me please?

Michael

Hi
Michael,

Thanks for your inquiry. Yes, you’re right; I would suggest you please download the ‘Aspose.Words for Java Samples’ archive from here and take a look at the XMLMailMerge example project.

Best Regards,