[8 of 9] Using Keys for Orderless Data
Using Keys for Orderless Data
It is always best to use keys when you have orderless data. The reason for this is that a comparator can find exact matches but when there have been changes it is impossible to say which match is the right one, so changes will be indicated by a delete and add. But if you use keys, then the corresponding elements can be matched up and a more accurate delta can be generated. Note these examples use the full context delta.
Consider the example below - without keys there is a deletion of one element and addition of another one.
- click ORIGINAL, NO KEYS to return to the original values without keys.
- click ADD KEYS to see the effect of adding keys - now the two corresponding choice elements can be compared.
DeltaXML Input and Output
| Document 1 | Document 2 |
|
DeltaXML: Idle
|
|
|
loading...
|
|
8 of
9