- . (IMHO) : ed (1) script. /usr/bin/diff -e old.xml new.xml ; diff (1) , . ed :
36a
<tr><td class="eg" style="background: #182349;"> </td><td><tt>#182349</tt></td></tr>
.
34c
<tr><td class="eg" style="background: #66ccff;"> </td><td><tt>#xxxxxx</tt></td></tr>
.
20,23d
- , . :
, , , . , , , (.. /^\.$/ patch_line == '.' ). , :
[line-number-range][command]
[optional-argument-lines...]
[dot-terminator-if-there-are-arguments]
, ed, ( ), , Array # insert, Array # delete_at, , Ruby , .
XML, :
<tag>
blah blah
</tag>
<other-tag x="y">
mumble mumble
</other>
:
<tag>blah blah</tag><other-tag x="y">mumble mumble</other>
- ; EOL , .
Ruby (google "ruby algorithm:: diff" ). diff XML , , , . , ed ( , ), .