The Compare action is used to check for differences between two fragments of XML data.
The two sets of XML data (source and target) can both be specified in one of three ways. They can be given directly as the name of the file containing the XML data, selected using the Choose File option (source file / target file), given as an XPath value into the FactBase that returns the name of the file containing the data (XPath to source file / XPath to target file), or they can be specified as an XPath into the FactBase resulting in an XML fragment that should be used directly (source location / target location).
The XML fragment detailing the results of the comparison will be inserted into the FactBase at the location specified by the output location field.
Finally, the detailed output parameter must be set either to 'true' or 'false' to indicate whether detailed information is required.
If detailed output is 'false', then the result of the comparison will only indicate whether the two sets of XML are 'identical', 'similar', or 'different'. The XML fragments will be considered 'similar' if they have the same content, but the ordering or whitespace information is different.
If the detailed output is 'true', then the output will still contain this high level result, as well as information on every difference between the two fragments.
The compare action also takes a property called the Merge Option. This property can either be set to append or replace. Replace will replace the contents of the output location with the comparison output. Append will add the output XML to the existing data at the target location, and is the default value.