Dependent on your goals, perhaps variations on the theme of a sorted list of all data paths might be useful? For example: considering the paths of all simple elements and attributes, including indexes, and representing text content as an appended last "step" - à la /a[1]/b[2]/c[2]#my text value.
I use this in test cases, comparing expected and found instances of complex structures; with any difference expressed in terms of (a) paths only in A, (b) paths only in B, (c) paths in both but with different text value.
Graydon Saunders <graydonish@gmail.com> schrieb am 14:38 Mittwoch, 19.Oktober 2016:
Hi Christian --
I was after a better, or at least less convoluted, way to add the UID attribute nodes. Your code snippet works in place, and faster; thank you!
If anyone happens to have a good general case structure-but-not-position document compare algorithm lying around, I'd be delighted to hear about it.
(It can't be just XSD because there's a pile of WSDL documents, too. And who knows what in the future.)
Thanks!
Graydon