in reply to Re: XML Parsing
in thread XML Parsing

You picked the wrong tool...

I would not make that sort of blanket assertion. Note that XML::Simple is actually a layer on top of XML::Parser -- and the man page for XML::Simple is (paradoxically) much longer and more complicated than the one for XML::Parser.

From my perspective, XML::Simple applies a lot of "default" (or maybe even inescapable) assumptions about what you intend to do with XML data, and if what you really want to do is a different from that... well, it might not be so "Simple".

Lots of good work can be done with XML::Parser, and it's not that hard to master. Maybe it's "the worst XML parsing interface on CPAN" for your purposes, but I'm sure there are many who find it both useful and appropriate for a variety of jobs.

Replies are listed 'Best First'.
Re^3: XML Parsing
by samtregar (Abbot) on Feb 02, 2006 at 19:48 UTC
    Note that XML::Simple is actually a layer on top of XML::Parser

    Sure, but that says nothing about the quality of the interface. XML::Parser is a high-quality, fast XML parser, but programming for it bites.

    and the man page for XML::Simple is (paradoxically) much longer and more complicated than the one for XML::Parser.

    I pity the fool that chooses modules based on the length of their man page! The only reason XML::Parser's man-page is so short is that it's missing a lot of useful stuff, like working examples. I'd much rather have a simple interface with a long manual than a complex interface with a short one.

    it's not that hard to master.

    Well, everbody's different, so I guess you might find it easier than most. Hang out on the perl-xml list and I think you'll see a pattern emerge - XML::Parser is pretty hard for most people to use. Almost everything else on CPAN that does the same job is more intuitive.

    -sam