Home > Archive > PERL Miscellaneous > June 2007 > Converting Diff Output to XML?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Converting Diff Output to XML?
|
|
| Debajit Adhikary 2007-06-26, 10:03 pm |
| What would be the best way to convert the regular (unix) diff output
into XML?
Are there any diff "libraries" available?
| |
| Michele Dondi 2007-06-26, 10:03 pm |
| On Tue, 26 Jun 2007 14:57:25 -0000, Debajit Adhikary
<debajit1@gmail.com> wrote:
>What would be the best way to convert the regular (unix) diff output
>into XML?
>Are there any diff "libraries" available?
Searching CPAN for diff returns tons of things most of which are
probably *not* what you're looking after since the term is
unfortunately so generic... But hopefully instead of parsing the
output of diff you may generate diff information yourself e.g. with
Text::Diff and then produce your XML from there, with the aid of and
XML dedicated module. It all really depends on *how* you want the diff
output to be in "converted in XML".
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{po
p^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
| |
| Debajit Adhikary 2007-06-26, 10:03 pm |
| On Jun 26, 12:15 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> On Tue, 26 Jun 2007 14:57:25 -0000, Debajit Adhikary
>
> <debaj...@gmail.com> wrote:
>
> Searching CPAN for diff returns tons of things most of which are
> probably *not* what you're looking after since the term is
> unfortunately so generic... But hopefully instead of parsing the
> output of diff you may generate diff information yourself e.g. with
> Text::Diff and then produce your XML from there, with the aid of and
> XML dedicated module. It all really depends on *how* you want the diff
> output to be in "converted in XML".
>
> Michele
The problem is, i'm dealing with very large files here, 75+MB - 1GB+,
and the only utility that seems to be able to compare these is bdiff
(I'm on the Solaris platform).
Can Text::Diff handle very large files?
I'll try it out still. Thanks!
| |
| Debajit Adhikary 2007-06-26, 10:03 pm |
| On Jun 26, 2:00 pm, Debajit Adhikary <debaj...@gmail.com> wrote:
> On Jun 26, 12:15 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
>
>
>
> The problem is, i'm dealing with verylargefileshere, 75+MB - 1GB+,
> and the only utility that seems to be able to compare these is bdiff
> (I'm on the Solaris platform).
>
> Can Text::Diff handle very large files?
>
> I'll try it out still. Thanks!
It turns out Text::Diff is taking a little too long to compare two
77MB files.
Does Perl provide any way to diff very large files?
|
|
|
|
|