Compare XML

Use this step to compare two XML data set.

Last published at: September 5th, 2025

xmlCompare Step

Description:

This step compares two XML datasets, returning the new items present in one dataset and removing the items from the other. 

 

Inputs

  • XML1 - XML data set 1
  • XML2 - XML data set 2
  • columnList - List of columns to compare
  • varGlobalXML1NewItems - Variable/Global to store XML1 new items
  • varGlobalXML2RemovedItems - Variable/Global to store XML2 removed items
 

 

Returns

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

 

 

Usage:

 

 

Example:

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

  • Create a new definition called “xmlCompareDef” and open the definition in designer mode. 
  • Drag an “UpdateVariables” and "xmlCompare" step to the canvas
  • Connect the dots between the “Start” and other steps, as shown above. 
  • Define a variable or a global to store the XML data for comparison.
  • Define a variable or a global to store the comparison result (for both new and removed).
  • Click the "UpdateVariables" step to configure its “Required” properties. Provide a name for the step. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description. 

 

  • Click the "UpdateVariables" step to configure its “Optional” properties. Click the button to define multiple variables and their values. Click the Add Row (+) button to insert an empty row. Enter a variable name and XML value as shown below. Click the Save button. You may add multiple variables by using the Add Row button. 

 

  • The XML data used for variables.varXML1 (for reference).
<SQLData>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>20</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <PROCESSID>eef9a64e-c2bb-4f4f-99df-a5201d841e42</PROCESSID>
    <RowID>0</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>24</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <PROCESSID>a3784005-c8d6-43f1-b5bc-05583b9ea617</PROCESSID>
    <RowID>1</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>36</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <PROCESSID>617b40af-2a9b-4ae0-8356-73410d2fb22c</PROCESSID>
    <RowID>2</RowID>
  </Row>
</SQLData>

 

  • The XML data used for variables.varXML2 (for reference).
<SQLData>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>20</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>0</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>20</PROCUREMENTTYPEID>
    <ROWNO>2</ROWNO>
    <RowID>1</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>24</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>2</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>24</PROCUREMENTTYPEID>
    <ROWNO>2</ROWNO>
    <RowID>3</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>36</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>4</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>36</PROCUREMENTTYPEID>
    <ROWNO>2</ROWNO>
    <RowID>5</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>38</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>6</RowID>
  </Row>
</SQLData>

 

  • Click the "xmlCompare" step to configure its “Required” properties. Provide a name for the step. Provide variable or global references for XML1 and XML2. Provide variable or global references to store new items in XML1 and removed items in XML2. 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 "xmlCompare" step to configure its “Optional” properties. Enter the shared column names (comma-separated) to use for comparison. 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 process instance, and execute it. The process step should compare two XML data sets, return new items from the first, and remove items from the second. Navigate to Administration - Run - Process Instance, then select the process instance to render. Click the xmlCompare step to view the properties. Click the varGlobalXML1NewItems icon to view the new items after comparison. Click the varGlobalXML2RemovedItems icon to view the duplicate items removed after comparison.  

 

  • The XML result set for varGlobalXML1NewItems after comparison (for reference).
<SQLData>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>24</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <PROCESSID>a3784005-c8d6-43f1-b5bc-05583b9ea617</PROCESSID>
    <RowID>0</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>36</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <PROCESSID>617b40af-2a9b-4ae0-8356-73410d2fb22c</PROCESSID>
    <RowID>1</RowID>
  </Row>
</SQLData>

 

  • The XML result set for varGlobalXML2RemovedItems after comparison (for reference).
<SQLData>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>20</PROCUREMENTTYPEID>
    <ROWNO>2</ROWNO>
    <RowID>0</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>24</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>1</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>24</PROCUREMENTTYPEID>
    <ROWNO>2</ROWNO>
    <RowID>2</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>36</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>3</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>36</PROCUREMENTTYPEID>
    <ROWNO>2</ROWNO>
    <RowID>4</RowID>
  </Row>
  <Row>
    <PROJECTID>9268</PROJECTID>
    <PROCUREMENTTYPEID>38</PROCUREMENTTYPEID>
    <ROWNO>1</ROWNO>
    <RowID>5</RowID>
  </Row>
</SQLData>

 

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.