Description:
The XMLToTXT step belongs to the File System category in FlowWright. Its XML definition identifies the step as xmltotxt, with the label “Writes XML to TXT file” and the display name “Write XML to TXT.” It is defined as a Process step using FlowWright.Workflow.XmlToTXT from FlowWright.Workflow.dll. The step has 2 input connections and 2 output connections.
This step can be used with the “ExecuteSQLStatement” step, which requires the “//Row” tag in the XML to process the data.
Inputs
- Variable/Global that holds the XML – identifies the Variable/Global containing the XML data.
- Txt file path – identifies the destination path for the TXT file.
- Write column names - optionally controls whether column names are written.
- Row delimiter – optionally specifies the delimiter used between rows.
- Column delimiter – optionally specifies the delimiter used between columns.
Returns
- True – Step executed successfully
- False – Step failed to execute
Usage:
The XMLToTXT step is typically used to write XML data to a text file as part of a workflow.
During process design:
- Add the XMLToTXT step to the process definition.
- Identify the Variable/Global containing the source XML.
- Specify the TXT file destination.
- Optionally enable Write column names.
- Optionally configure the Row delimiter.
- Optionally configure the Column delimiter.
- Connect the step to the surrounding workflow operations.
- Save the Process Definition.
- Create a Process Instance and execute the workflow.
- Verify that the TXT file is created at the configured path.
- Verify the generated rows, columns, and headings where applicable.
The XML and TXT file path properties are required, while the formatting-related properties are optional.

Typical workflow suggestions:
- Generate text-based reports - Use XMLToTXT when workflow data has already been assembled in XML and needs to be converted to a text file.
- Export workflow data - Use the step to export XML-based workflow data into a text-based format.
- Create delimited data files - Use Row delimiter and Column delimiter when the generated TXT file needs a structured, delimited format.
- Include column headings - Enable Write column names when the generated TXT file should identify the columns in the exported data.
- Prepare files for downstream systems - Use XMLToTXT when another system or workflow operation expects text-file input.
- Scheduled data exports - Place XMLToTXT after a data-collection or reporting process to automatically generate text files.
- Generate custom-delimited output - Use the delimiter properties when the receiving application expects a particular row and column separation.
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 variable to store the result.
- Configure the 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~
Tips:
- Ensure that the Variable/Global specified in Variable/Global that holds the XML contains the expected XML data.
- Ensure that the TXT file path points to the intended output location.
- The XML Variable and TXT file path properties are required.
- Enable Write column names when column headings are required in the generated file.
- Configure Row delimiter when the receiving application requires a particular row separator.
- Configure Column delimiter when the receiving application requires a particular column separator.
- Test the generated TXT file with representative XML data before deploying the workflow.
- Validate the source XML when it is generated dynamically.
- Verify the output file after process execution.
- Use descriptive Variable/Global names such as
SourceXMLandOutputTXTPath. - Keep XML preparation and TXT generation as separate workflow stages where possible.
- Do not assume a particular default row or column delimiter; the XML definition does not specify one.
- Do not assume that the step supports specific text encodings or file formats beyond the defined TXT output.
- The XML identifies True and False returns but does not document the conditions associated with either path.
Notes:
- Category: File System
-
Internal name:
xmltotxt - Label: Writes XML to TXT file
- Display name: Write XML to TXT
-
Namespace:
FlowWright.Workflow.XmlToTXT -
DLL:
FlowWright.Workflow.dll - Step definition type: Process
- Input connections: 2
- Output connections: 2
- Configurable properties: 5
-
XML Variable property:
xmlVariable -
TXT file path property:
txtFilePath -
Column headings property:
writeColHeadings -
Row delimiter property:
rowDelimiter -
Column delimiter property:
colDelimiter - XML Variable: Required
- TXT file path: Required
- Write column names: Optional
- Row delimiter: Optional
- Column delimiter: Optional
- String properties: XML Variable, TXT file path, Row delimiter, Column delimiter
- Checkbox property: Write column names
- Returns: False / True
Feature Comparison: clsXMLToJSONConverter vs. XMLToTXT vs. XMLToXLS
All three FlowWright steps take XML-related input and convert or write it into another representation, but their intended outputs are different:
- clsXMLToJSONConverter converts XML into JSON and stores the JSON in a Variable/Global.
- XMLToTXT writes XML data to a TXT file, with optional row and column delimiters.
- XMLToXLS writes XML data to an XLS file, with optional worksheet, XPath, and column-heading configuration.
| Feature | clsXMLToJSONConverter | XMLToTXT | XMLToXLS |
|---|---|---|---|
| Purpose | Converts XML to JSON format | Writes XML to a TXT file | Writes XML to an XLS file |
| Category | Development | File System | File System |
| Internal name | clsxmltojsonconverter |
xmltotxt |
xmltoxls |
| Label | Convert XML to JSON | Writes XML to a TXT file | Writes XML to xls file |
| Display name | Convert XML to JSON Format | Write XML to TXT | Write XML to XLS |
| Namespace | FlowWright.Workflow.ClsXmlToJsonConverter |
FlowWright.Workflow.XmlToTXT |
FlowWright.Workflow.XmlToXLS |
| DLL | FlowWright.Workflow.dll |
FlowWright.Workflow.dll |
FlowWright.Workflow.dll |
| Step definition type | Process | Process | Process |
| Input connections | 2 | 2 | 2 |
| Output connections | 2 | 2 | 2 |
| Number of configurable properties | 2 | 5 | 5 |
| Primary input | Input XML | Variable/Global containing XML | Variable/Global containing XML |
| Output destination | Variable/Global containing JSON | TXT file path | XLS file path |
| Input XML property | inputXml |
xmlVariable |
xmlVariable |
| Input XML label | Input XML | Variable/Global that holds the xml | Variable/Global that holds the XML |
| Input XML required? | Yes | Yes | Yes |
| Input XML data type | multilineTextBox |
string |
string |
| Output destination property | jsonOutputVar |
txtFilePath |
xlsFilePath |
| Output destination required? | Yes | Yes | Yes |
| Output destination data type | string |
string |
string |
| Column headings | Not available | Optional | Optional |
| Row delimiter | Not available | Optional | Not available |
| Column delimiter | Not available | Optional | Not available |
| XPath/XML node selection | Not available | Not available | Optional |
| Worksheet name | Not available | Not available | Optional |
| Output format | JSON | TXT | XLS |
| Output stored in Variable/Global? | Yes | No—the configured destination is a TXT file path | No—the configured destination is an XLS file path |
| Returns | True / False | True / False | True / False |
| Best suited for | XML-to-JSON conversion and downstream JSON processing | Generating delimited text files | Generating spreadsheet files from XML |
| Property types | Multiline text box + string | String + checkbox | String + checkbox |
| Specialized configuration | Direct XML input | Delimiters and column headings | XPath, worksheet name, column headings |
Definition Sample:
You may provide a sample process definition containing the XMLToTXT step and import it into the FlowWright Process Definition (XML file) page.
After importing the sample, configure:
- Variable/Global that holds the XML
- TXT file path
- Write column names, if required
- Row delimiter, if required
- Column delimiter, if required
- Connections to the preceding and subsequent workflow steps
Click here to download the sample file.