Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Recomendations for a XML writer module

by salva (Canon)
on Jul 17, 2017 at 09:20 UTC ( [id://1195238]=note: print w/replies, xml ) Need Help??


in reply to Recomendations for a XML writer module

After considering all the alternatives proposed it seems I should still stick to XML::LibXML:

XML::XSH2 as suggested by choroba seems interesting, but it is a language of its own, and overkill for the task at hand that is to generate a XML document from a Perl data structure.

Using a templating module as Template doesn't seem like a good option in my case either; my structure is deeply recursive which would make the template complex. Besides that, I don't want to think about escaping data and whether I am generating correct XML.

XML::Compile, seems also overkill in this case. The schema is quite big I am only going to use a very small subset.

XML::Writer, seems right for the job but I don't like how it works, keeping an implicit tag open and manipulating it.

XML::Twig and probably XML::Rules, are excellent modules for parsing XML.

So, I am doing as haukex and using XML::LibXML with a couple of helper subs, to get rid of its verbosity (update: Soon to be available from CPAN as XML::FromPerl!)

  • Comment on Re: Recomendations for a XML writer module

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-18 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found