in reply to Re: XML::Dumper: Nifty or Naughty?
in thread XML::Dumper: Nifty or Naughty?

Jaap, thanks for your response.
Here is what my debugger thinks of $ssxmlified. sorry about the name.
$ssxmlified = "<perldata>\n <hashref memory_address=\"0x1b932f8\">\n <item key=\"ferret\">\n <arrayref memory_address=\"0x1b9f174\">\n <item key=\"0\">sredni</item>\n <item key=\"1\">vashtar</item>\n </arrayref>\n </item>\n <item key=\"hen\">anabaptist</item>\n </hashref>\n</perldata>\n";

here is $rexmlified
$rexmlified = "<perldata>\n <hashref memory_address=\"0x21e8434\">\n <item key=\"ferret\">\n <arrayref memory_address=\"0x329ac98\">\n <item key=\"0\">sredni</item>\n <item key=\"1\">vashtar</item>\n </arrayref>\n </item>\n <item key=\"hen\">anabaptist</item>\n </hashref>\n</perldata>\n";

which look pretty much identical to me, except those memory addresses. i thought xml_compare ignored these. will delve into the sub itself. any further thoughts very welcome.

Replies are listed 'Best First'.
Re: Re: Re: XML::Dumper: Nifty or Naughty?
by wufnik (Friar) on May 09, 2003 at 14:20 UTC
    XML::Dumper is indeed nifty, though to use xml_compare properly, you should not use the OO form

     $xdumper->xml_compare($this,$that);

    but just plain ol'

     xml_compare($this, $that);

    the functional way.

    no qualifiers necessary. some of xml::dumper's functions are available in both functional and oo forms, but sadly not xml_compare, and i presume xml_identity. perhaps the perldoc should be augmented a teensy bit on this? whatever, this doesn't cast any shadow on the module itself, which gets a big thumbs up from me anyway.

    hmmm, do i get experience points for answering my own question, or are they deducted?