in reply to Examples where XML::Simple is the optimal choice?

The only case where I think XML::Simple is still fine to use is reading simple configuration files whose structure has been designed to map cleanly to a Perl hash/arrayref structure. Otherwise, especially when writing XML, I agree that other XML modules are much more reliable.
  • Comment on Re: Examples where XML::Simple is the optimal choice?

Replies are listed 'Best First'.
Re^2: Examples where XML::Simple is the optimal choice?
by ikegami (Patriarch) on Oct 23, 2015 at 14:49 UTC
    No, it's awful at that. It can't even do [ 'foo', [ 'bar' ] ]. JSON is far more optimal.
Re^2: Examples where XML::Simple is the optimal choice?
by Preceptor (Deacon) on Oct 23, 2015 at 12:59 UTC
    my $config = XML::Twig -> parsefile ( 'config.xml') -> simplify;

    I suppose the XML::Simple is technically winning here, due to fewer keystrokes needed:

    my $config = XMLin ('config.xml' );

    I wonder a little about performance, but don't think there'll be much in it for the size of config we'll be talking about