XMLToTxt Step

Use this step to convert XML to TXT format

Last published at: January 5th, 2026

Description:

This step converts the XML data to a tab-delimited TXT file with rows and columns. It can be used with the “ExecuteSQLStatement” step, which requires the “//Row” tag in the XML to process the data.

 

Inputs

  • 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
 

 

Returns

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

 

Usage: 
 

 

Example: 

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

  • Create a new definition called “XmlToTxtDef” and open the definition in designer mode. 
  • Drag the “ExecuteSQL” and “XMLtoTXT” steps to the canvas. 
  • Define a variable or a global to store the result. 
  • Configure Variable variable.xmlData as a string to hold the XML value (containing //Row tag) 
  • Connect the dots between the “Start” and other steps, as shown above. 
  • Click the “executeSQL” step to configure its “Required” properties. Provide a name for the step. Select the connection string from the drop-down list. Enter the SQL statement to execute. Select “XML” as the result format from the drop-down list. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description. 

 

  • Click the “executeSQL” step to configure its “Optional” properties. If the database is different from the FlowWright database, enter the database name. Specify a variable or a global to store the XML value. Select “No” to retrieve the entire result set. Set the SQL command time-out duration (in seconds). Click the button to specify the SQL parameters. Click the Save button. 

 

  • Click the “XmlToTXT” step to configure its “Required” properties. Provide a name for the step. Provide the variable or global reference that contains the XML value. Provide the text file path. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • Click the “XmlToTXT” step to configure its “Optional” properties. Set the column names to “OFF” to skip writing the column names. Provide the row delimiter (pipe symbol |). Provide the column delimiter (tilde symbol ~). Click the Save button. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute it. The step should transform the XML data into a TXT file and save it to the path specified on the server. 

 

  • A sample XML data (containing //Row tags) is shown here.
<SQLData>
  <Row>
    <DEUSERID>8f86ba16-c285-4326-a73b-00e0649f82c7</DEUSERID>
    <DEEXTERNALUSERFULLNAME>Re-assigning</DEEXTERNALUSERFULLNAME>
    <RowID>0</RowID>
  </Row>
  <Row>
    <DEUSERID>8f86ba16-c285-4326-a73b-00e0649f82c9</DEUSERID>
    <DEEXTERNALUSERFULLNAME>Test</DEEXTERNALUSERFULLNAME>
    <RowID>1</RowID>
  </Row>
  <Row>
    <DEUSERID>5c699c6e-a382-4dea-b6ed-02584e7ab961</DEUSERID>
    <DEEXTERNALUSERFULLNAME>DMilan</DEEXTERNALUSERFULLNAME>
    <RowID>4</RowID>
  </Row>
  <Row>
    <DEUSERID>5c699c6e-a382-4dea-b6ed-02584e7ab976</DEUSERID>
    <DEEXTERNALUSERFULLNAME>mila</DEEXTERNALUSERFULLNAME>
    <RowID>5</RowID>
  </Row>
</SQLData>

 

  • A sample XML-to-TXT transform is shown here.
DEUSERID|DEEXTERNALUSERFULLNAME|RowID~8f86ba16-c285-4326-a73b-00e0649f82c7|Re-assigning|0~8f86ba16-c285-4326-a73b-00e0649f82c9|1~5c699c6e-a382-4dea-b6ed-02584e7ab961|DMilan|2~5c699c6e-a382-4dea-b6ed-02584e7ab976|mila|3~f2327f71-6c22-44cb-b719-05a96c8f0463|9~

 

Definition Sample:

You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page. 

Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after the import. Then, save the definition to confirm the changes. 

Click here to download the sample file.