Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Recomendations for a XML writer module

by haukex (Archbishop)
on Jul 13, 2017 at 17:48 UTC ( [id://1195060]=note: print w/replies, xml ) Need Help??


in reply to Re: Recomendations for a XML writer module
in thread Recomendations for a XML writer module

XML::Simple ... it is simple, and sometimes functional XML requirements are simple, too

Sorry, but I have to strongly recommend against XML::Simple for any XML output, and don't even think about trying to round-trip XML files with XML::Simple. Reading simple XML files with the module might be acceptable if and only if the user is aware of all of the issues, but most people who come here to ask for help with XML::Simple are clearly not aware of those issues, and that's a problem with that module. Despite the fact that I really like the idea behind the module, unfortunately XML::Simple's output format is just too brittle and most XML schemas are too strict for the module to be a reliable XML writer.

XML::Rules is a pretty good replacement for XML::Simple for reading XML files into data structures, but I've noticed it's also still not always able to perfectly round-trip XML files. Personally, for writing XML files, I usually find myself using XML::LibXML (despite the relative verbosity of its API, since a few short helper subs take care of that), and for reading or filtering XML files, especially large ones, XML::Twig.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195060]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found