Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: XML::Twig compare Twigs

by Skeeve (Parson)
on Feb 14, 2004 at 08:01 UTC ( #328942=note: print w/replies, xml ) Need Help??


in reply to Re: XML::Twig compare Twigs
in thread XML::Twig compare Twigs

Almost but missed ;-)

If I'm not completely wrong, Test::XML is not for comparing but for testing whether or not something is xml.

XML::SemanticDiff could do it if my files were in the filesystem. But as I said: They are read from a database. I could save them in the file system but then I'd also need a module for random, unique filenames (Yes! I know there is one).

Nevertheless: Thanks for your try.

Regarding the (not-so-well) hidden allegation that I didn't search by myself. There is a reason behind it. You'll find the experts here. People with some experience. So why not hope one or the other has good recommendations for modules doing what I need. You can't recommend, as you stated yourself to have no experience.

Let's hope someone with some more XML::Twig knowledge has an answer too.

Replies are listed 'Best First'.
Re: Re: Re: XML::Twig compare Twigs
by PodMaster (Abbot) on Feb 14, 2004 at 17:16 UTC
    XML::SemanticDiff could do it if my files were in the filesystem. But as I said: They are read from a database.
    So, why is that a problem ? Doesn't matter, this is perl. Try either IO::Scalar or IO::String

    I believe this question has come up before, so I'd super search if I were you.

    update: upon closer examination, XML::SemanticDiff is built on XML::Parser, so no need for IO::Scalar or IO::String.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Re: Re: XML::Twig compare Twigs
by qq (Hermit) on Feb 14, 2004 at 21:59 UTC

    Sorry! I didn't mean it to be a jibe about not searching yourself, although I see it reads like that. I was actually trying to point out I wasn't providing a recommendation based on real use - the kind of thing you are right to expect from the monastery.

    I looked at all because I know I'll shortly be needing a similar task. Please post what solution you end up with

    BTW, on looking slightly further at XML::Test I see it uses XML::SematicDiff to do its comparisons. It is not testing if something is XML, but if two xml snippets are semantically equivalent. However its not really appropriate since a) its bulit as a Test module and b) its just using XML::SemanticDiff anyway.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://328942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-05-28 22:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (166 votes). Check out past polls.

    Notices?