On 8/29/06, Steve Bennett <stevage(a)gmail.com> wrote:
No, but I'm wondering what happens if you simply
flatten it down to
text then diff. What's the worst that could happen?
The worst that could happen is it's all on one line and your diff
engine says "line 1 was changed, here are the lines side-by-side".
No, that wouldn't work too well: instead, how about you
1) Compress all whitespace in each document per XML specs,
2) Replace all /(<.*?>)/ with /\n$1\n/ in each document,
3) Run a normal line-based diff, such as the one we use now.
Each tag will then be on one line, and so will the contents of each
tag. Perfect? Ideal? No, but definitely usable.