Using Numeric Tolerances with XML Data Compare

XML is often used to represent engineering, scientific, or financial data where numeric values are important. Sometimes small changes in these values are not significant and you want to focus on the values that are. We’ll go through how you can indicate numeric tolerances with XML Data Compare.

Numeric Data

I used the magnetic field calculator from NOAA to determine the magnetic data for my location for two dates one month apart.  This is the result of the comparison:

Marking Insignificant Changes

You might decide that changes in the total intensity are only significant when greater than 5nt.  Adding these lines to the config file gives the result you want:

<dcf:location name="totalintensity-tolerance" xpath="//totalintensity">
  <dcf:numeric tolerance="5" use="A">
</dcf:numeric></dcf:location>

Per the attribute use=”A”, the result takes the value from the “A” file.

More Examples

See our web page Numeric Tolerances for a general discussion of this feature including more examples of element tolerances and using XPaths to identify numeric values.

There is a range of samples available on Bitbucket demonstrating various features of XML Data Compare.

Keep Reading

All our software pre-installed ready to go on AWS Server Image (AMI)

DeltaXML offers pre-installed software on Amazon Machine Images (AMI).

Trialling DeltaXML Products With Your Free Evaluation

DeltaXML offers fully-featured trial versions of their products, allowing users to explore all functionalities within a limited timeframe.

JSON Merge Strategies: 2-way, 3-way Merges and Graft

JSON merge strategies involve two main scenarios: simple JSON data merge and merging changes between JSON files.

How to represent changes in JSON

The representation of changes in JSON can be achieved through a delta format, which includes the original and new values for describing found diffs.

How to compare JSON values, objects and arrays

Comparing JSON files involves normalising numbers and strings, handling object properties with unique keys, and more.

Matching Records that are in No Particular Order

XML Data Compare allows for efficient comparison of unordered data, like entries in an electronic address book.

Comparing Config Files with XML Data Compare

Config files for telephones can be effectively compared using XML Data Compare by adjusting the DeltaXML configuration file.

Using Numeric Tolerances with XML Data Compare

Numeric tolerances can be applied in XML Data Compare to focus on significant changes in engineering, scientific, or financial data.

First Steps with XML Data Compare

XML Data Compare offers easy configuration adjustments via a config file without the need for XSLT filters, allowing users to tweak settings where needed.