|
Posted by junnuthala on February 23, 2005, 2:01 am
Please log in for more thread options
Hello,
Can someone please suggest me a Perl module for comparing huge XML
Files.
I tried XML::SemanticDiff, but it is taking a lots and lots of time to
load the XML File nodes, elements and attributes to the Hash.
Any suggestions would be really appreciated.
Thank you
-Venkat
|
|
Posted by John Bokma on February 23, 2005, 7:36 pm
Please log in for more thread options
junnuthala wrote:
> Hello,
>
> Can someone please suggest me a Perl module for comparing huge XML
> Files.
How do you want to compare them?
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
|
|
Posted by junnuthala on February 23, 2005, 1:44 pm
Please log in for more thread options
John Bokma wrote:
> junnuthala wrote:
>
> > Hello,
> >
> > Can someone please suggest me a Perl module for comparing huge XML
> > Files.
>
> How do you want to compare them?
Parse and read the XML elements, attributes text into a tree or a hash
and then compare.
I tried using Semanticdiff, but it is taking a lot of time to read the
XML file into Hash.
>
> --
> John Small Perl scripts: http://johnbokma.com/perl/
> Perl programmer available: http://castleamber.com/
> Happy Customers: http://castleamber.com/testimonials.html
|
|
Posted by Thomas Malt on February 24, 2005, 1:25 am
Please log in for more thread options
> John Bokma wrote:
>> junnuthala wrote:
>>
>> > Hello,
>> >
>> > Can someone please suggest me a Perl module for comparing huge XML
>> > Files.
>>
>> How do you want to compare them?
>
> Parse and read the XML elements, attributes text into a tree or a hash
> and then compare.
>
> I tried using Semanticdiff, but it is taking a lot of time to read the
> XML file into Hash.
That will take a lot of time no matter what you do. But define
"huge". And define "a lot of time" :).
If you want efficiency more than anything else then XML::Parser is
still the fastest. Or at least it was the last time I checked.
Implementing handlers to put attributes and CDATA into an HASH is
really straight forward, but if your files are in the 100MB area
that could still take several minutes depending on your hardware.
Thomas
--
: Thomas Malt.: tm@linpro.no ...: http://www.malt.no/ ...: +4797748504 :
: Linpro AS...: info@linpro.no .: http://www.linpro.no/ .: +4722871180 :
: :... >> Ledende på Linux i Norge >> Best på alt i verden :
|
|
Posted by junnuthala on February 24, 2005, 6:07 pm
Please log in for more thread options
Thomas Malt wrote:
>
> > John Bokma wrote:
> >> junnuthala wrote:
> >>
> >> > Hello,
> >> >
> >> > Can someone please suggest me a Perl module for comparing huge
XML
> >> > Files.
> >>
> >> How do you want to compare them?
> >
> > Parse and read the XML elements, attributes text into a tree or a
hash
> > and then compare.
> >
> > I tried using Semanticdiff, but it is taking a lot of time to read
the
> > XML file into Hash.
>
> That will take a lot of time no matter what you do. But define
> "huge". And define "a lot of time" :).
>
I have a XML file of sixe 6MB, but it has more than 300,000 elements.
> If you want efficiency more than anything else then XML::Parser is
> still the fastest. Or at least it was the last time I checked.
>
XML::Parser is taking almost 35 minutes to get the result as a tree.
> Implementing handlers to put attributes and CDATA into an HASH is
> really straight forward, but if your files are in the 100MB area
> that could still take several minutes depending on your hardware.
>
> Thomas
> --
> : Thomas Malt.: tm@linpro.no ...: http://www.malt.no/ ...:
+4797748504 :
> : Linpro AS...: info@linpro.no .: http://www.linpro.no/ .:
+4722871180 :
> : :... >> Ledende på Linux i Norge >> Best på alt i
verden :
|
| Similar Threads | Posted | | Problem Parsing Huge XML file using XML::Twig | April 23, 2007, 10:24 pm |
| Portable dot-files (hidden-files) ? | November 5, 2007, 1:20 am |
| How to solve memory problems while running a script parsing huge data | July 13, 2004, 1:23 pm |
| ANNOUNCE: List-Compare-0.31 | August 15, 2004, 10:26 am |
| ANNOUNCE: List::Compare v0.31 | August 22, 2004, 2:06 pm |
| how to use ImageMagick to compare 2 images? | September 3, 2004, 11:05 pm |
| Net::LDAP compare question | June 16, 2006, 10:08 am |
| compare MSXML objects (nodes) | February 28, 2007, 2:49 am |
| [ANNOUNCE] Test::Float -- compare numbers to specified precision | December 26, 2004, 4:20 pm |
| Printing of PDF Files | July 12, 2004, 4:55 pm |
|