On Wed, 31 Jan 2001, Matt Sergeant wrote:

I wrote:
> >     What could be simpler than:
> >
> >             $xml = XML::Tree->new( 'foo.xml' );
> >             $ref = $xml->as_array();
> 
> Its what's in $ref thats complex (or more complex than XML::Simple), see
> the man page for XML::Simple.

        Yes, but I think XML::Simple got the data structures generally
        wrong and has too many options.  A user of XML::Simple looking
        at his own code a few weeks later, or, worse, somebody else's,
        always has to (re)figure out what options were given to it at
        data-structure creation time and what that really means in
        terms of the data structure you get back.  This means you're
        always having to look at the man page.

        You may think XML::Simple results in simpler data structures;
        however, the mental energy expended to refigure stuff out makes
        XML::Simple more complex in the long term.  Aside from being
        slow, this is another complaint about it.

        In contrast, the data structure you get back from XML::Tree is
        always the same.  As Antoine de Saint-Exupery remarked:

                A designer knows he has arrived at perfection
                not when there is no longer anything to add,
                but when there is no longer anything to take
                away.

        - Paul

Reply via email to