Skip to main content
Version: 2.30

XML and JSON Replacement Steps

Cycle contains the following steps for replacing text within XML documents:

I replace variables in XML|JSON "<a>${VAR}</a>" with variable "new_XML"
I replace variables in XML|JSON file "INPUT_FILE" and save as "OUTPUT_FILE"
I replace variables in XML|JSON "<a>${VAR}</a>" and save as "OUTPUT_FILE"
I replace variables in XML|JSON file "INPUT_FILE" with variable "new_XML"

These steps allow Cycle to interface directly with XML and JSON code snippets.

By using a template file with Cycle variable placeholders, Cycle users can end up with a new XML or JSON document that can be posted to an API.

Common use cases​

Test data management​

By injecting data into the system under test via an XML document, while keeping the test cases parameterized, test suites can be much more modular and flexible.

Web API calls​

Many of the APIs that Cycle interacts with require a posted JSON body. These steps allow for parameterized JSON.