XML JSON Diff
The XML Diff Component leverages the diff-js-xml NPM package to compare two XML documents and show the differences between the two documents.
This action takes two strings as parameters:
left XML and
The action validates both XML strings and throws an error if either is invalid.
If both strings are valid XML, the component calls the
diffAsXml function of the diff-js-xml package, passing the left XML string as the argument to the
lhsXml parameter and the right XML string as the argument to the
The schema parameter is currently unsupported; the component passes
The component emits an array containing a JSON object for each difference found by the diff function. The differences can either be of type missing element or difference in element value.
Each result object has path, type, and message fields detailing the difference found and its location in the XML string.
By default, the component returns a single message containing an array of all differences. To emit a single message for each difference, a user can select the Split result if it’s an array checkbox on the input form.