Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: XML::Twig compare Twigs

by qq (Hermit)
on Feb 14, 2004 at 00:01 UTC ( [id://328903]=note: print w/replies, xml ) Need Help??


in reply to XML::Twig compare Twigs

Test::XML, XML::SemanticDiff

This from three minutes on seach.cpan.org, not from personal experience.

qq

Replies are listed 'Best First'.
Re: Re: XML::Twig compare Twigs
by Skeeve (Parson) on Feb 14, 2004 at 08:01 UTC
    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.
      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.

      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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://328903]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-25 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found