XPath expressions will not help you find the differences between two XML trees.
At best you can iteratively probe the depth of the XML tree(s) using depth-limited XPath expressions like //[count(ancestor::*)=$depth] and look at whether you get a different number of nodes returned. Whether that produces a meaningful difference or not depends on the actual needs, which seem to be more along the line of a textual diff instead of a structural diff to me.
If you are making these suggestions in earnest, please also include code or concrete applications in pseudo-code, instead of "scare quotes" around verbs to suggest that you are talking about programming. Leaving it to the seekers to interpret your posts in a helpful way does not in fact help them achieve their goals.
In reply to Re^6: XML file difference highlights
by Corion
in thread XML file difference highlights
by PiyaPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |