Writes XML to TXT file

Use this step to convert XML to TXT format.

Last published at: September 12th, 2023

XMLToTxt Step


This step converts the XML data into TXT format with rows and columns. It may be used in conjunction with the ExecuteSQLStatement step as it requires the//Row tag in the XML to process.



  • xmlVariable – Variable that holds the xml. Ex: - variable.data
  • txtFilePath – TXT file path on the FlowWright server
  • writeColHeadings - Write column names
  • rowDelimiter – Row delimiter
  • colDelimiter – Column delimiter



  • True – step executed successfully
  • False – step failed to execute 






Let’s build and execute the “XmlToTxtDef” example.          

  • Create a new definition called “XmlToTxtDef.” 
  • Select the definition and click the “design” button
  • Drag the “ExecuteSQL” and “XMLtoTXT” steps from the toolbox
  • Configure Variable variable.xmlData as a string to hold the XML value (containing //Row tag) 
  • Connect the dots between the start, “ExecuteSQL” and “XMLtoTXT”  steps
  • Click on the “executeSQL” step to configure its “Settings” properties. Provide a name to the step. Select the connection string from the drop-down list. Provide the SQL statement to execute. Select “XML” as the result format from the drop-down list. 


  • Click on the “executeSQL” step to configure its “Advanced” properties. Provide a database name if it's different from the FlowWright database. Provide variable/global to store the XML value. Select “No” to get an entire result set. Provide SQL command time-out duration (in seconds). Click on the button to provide the SQL parameters.  


  • Click on the “XmlToTXT” step to configure its “Settings” properties. Give the step a name. Provide the variable/global reference containing the XML value. Provide the text file path information. 


  • Click on the “XmlToTXT” step to configure its “Advanced” properties. Selection “OFF” to ignore column names. Provide the row delimiter sign (pipe symbol |). Provide the column delimiter sign (tilde symbol ~). 


  • Save the process definition, create a new process instance, and execute. The step should transform the XML data into a TXT file and save it to the path specified on the server. 
  • A sample xmlData (containing //Row tags) are shown here
  • A sample XMLtoTXT transform is shown here