Add data to XML file

Hi,

I have an XML file and a data table type variable. I want to add my data table into the XML file. Attaching the screenshot of my XML file. I want to add data under column Spreadsheet Key, Auto complete, Company and so on which is stored in data table variable.

may we ask you to share XML file with us, so we can refer to details (e.g. used namespaces, tree structures)

in general the flow would be like:

  • read Text activity - read in XML file
  • Deserialize the XML into a XDoxument . xDoc
  • iterate over all columns from Excel row
  • fetch the corresponding XML Element e.g by
  • xDoc.Element(“Header”).Element(“YourElementName”) - myXElement
  • check if myXELement is not null with isNothing(…) Function
  • update it with myXElement.Value = newValueFromExcel

Saving the updated XML can be done with write text file and xDoc to String as content
Or with the xDoc.Save Method used within an invoke method acitvity