Converting Diff Output to XML?

D

Debajit Adhikary

What would be the best way to convert the regular (unix) diff output
into XML?
Are there any diff "libraries" available?
 
M

Michele Dondi

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
 
D

Debajit Adhikary

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!
 
D

Debajit Adhikary

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?
 
M

Michele Dondi

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?

77Mb files do not look like generic ones. Are they plain text? What
kind of diff algorithm do you have in mind? Did you additionally check
CPAN? Lots of gems abound there anyway!


Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top