Posted Thu, 30 Jul 2020 23:17:47 GMT by

Good afternoon everyone.  I'm having an issue with an XML file created by Automate Premium  I've tried many things but nothing is giving the exact results needed.  The task creates a XML file from a dataset using the commands:

<AMFILESYSTEM ACTIVITY="csv_to_dataset" SOURCE="D:\temp\file.csv" RESULTDATASET="row" DELIMITER="|" />
<AMFILESYSTEM ACTIVITY="write_file" FILE="d:\temp\process.xml" ENCODING="utf-8" APPEND="no">%varXml%</AMFILESYSTEM>


The XML file is created and has this in the first line:
<?xml version="1.0" encoding="UTF-8"?><AutoMateDataset><row>

My dev team needs the <AutoMateDataset>  in that first line to actually be the word <delimited>.

How can I change this field in the XML file?

Thanks in advance!  


Posted Thu, 06 Aug 2020 22:13:49 GMT by

Hello Debi,

One suggestion is since you are writing the data, you can modify the text before writing it. Here is an example of how to replace text:

<AMVARIABLE NAME="varXml" VALUE="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;AutoMateDataset&gt;&lt;row&gt;" />
<AMTEXT ACTIVITY="replace" TEXT="%varXml%" FIND="AutoMateDataset" REPLACE="delmited" RESULTVARIABLE="varNew" />


You must be signed in to post in this forum.