Free Support Forum -

Not merging whole node if any of child node is not present

Dear Aspose,

I am licensed user of Aspose.

I am using Aspose version 11.0.0

I have an xml in following format and template document. When i merge this xml with attached template then data for WellBorePropertiesFirst and WellBorePropertiesSecond display properly.

Issue is that in case if there any of child node WellBorePropertiesFirst and WellBorePropertiesSecond is not present in xml then in after merging in final document data of both node not appaer. So if any child node is not present then both node doesn't display avalable data in xml.

Please let me know how can i print the data in final document after merging even if any data available for any child node. Both should not disappear if any child node is not present.

sample xml file and template is attached for reference.




22 ft




32 ft

33 ft

Hi Arvind,

Thanks for your inquiry. I have tested the scenario with following code snippet and have not found any issue with output file. I have removed the child nodes of WellBorePropertiesFirst and WellBorePropertiesSecond and have tested the shared issue, the output files look good. I have attached the output files with this post for your kind reference. It would be great if you please share following details for investigation purposes.

What environment are you running on?

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • .NET Framework version
  • Please supply us with the code from your application that is causing the issue
  • Please supply us with the output document showing the undesired behavior
  • Please supply us with the expected document showing the desired behavior (You can create this document using Microsoft Word).

As soon as you get these pieces of information to us we’ll start our investigation into your issue.

<span style=“font-size:
10.0pt;font-family:“Courier New”;color:#2B91AF;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> doc = new Document(MyDir

  • “Proposal.docx”);<o:p></o:p>

DataSet ds = new DataSet();

ds.ReadXml(MyDir + "wellbore.xml");


doc.Save(MyDir + "AsposeOut.docx");