[erlang-questions] XML diff

Wes James comptekki@REDACTED
Wed Feb 1 17:49:45 CET 2012

On Tue, Jan 31, 2012 at 2:45 PM, Roberto Ostinelli <roberto@REDACTED> wrote:
> Dear list,
> I was wandering if there is some available work done in generating XML files
> diff, obviously in Erlang but this is a broader question.

Are you going to have trivial xml files so that a simple line
comparison would work?



p() ->

p2(F1,F2,Acc) ->
    case F1_line of
        eof -> [];
        _ ->
            case Res1 =:= Res2 of
                 true -> [{ok, same, Acc}|p2(F1,F2,Acc+1)];
                 false -> [{ok, diff, Acc}|p2(F1,F2,Acc+1)]

If not you, working with some of these ideas might:


Regarding read_line, its odd that it returns a tuple until eof is
reached.  Shouldn't it return {ok, eof}?


More information about the erlang-questions mailing list