Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

What is the best XML module to use?

by crusty_collins (Friar)
on Oct 06, 2005 at 16:24 UTC ( [id://497982]=perlquestion: print w/replies, xml ) Need Help??

crusty_collins has asked for the wisdom of the Perl Monks concerning the following question:

O great monks, I have a new project in the planning stages that will need to read and write xml files. The xml will be simple but the files could get fairly large. I have been looking around a bit for info on which module to use... There is a LOT out there. I was thinking about using Xpath. Any suggestions? Thanks for all the advice. A good using twig web page http://www.xml.com/pub/a/2001/03/21/xmltwig.html

Replies are listed 'Best First'.
Re: What is the best XML module to use?
by GrandFather (Saint) on Oct 06, 2005 at 16:29 UTC

    Search for XML - there has been a bit of discussion of exactly that question recently. To the extent that programmers (or monks) ever come to a concensus - the answer is XML::Twig.


    Perl is Huffman encoded by design.
Re: What is the best XML module to use?
by davidrw (Prior) on Oct 06, 2005 at 16:56 UTC
    There was some discussion yesterday in the thread The mostly used xml parser ...
    but basically it just depends on your requirements.. for example XML::Simple is a good starting place, but has limits that are very clearly discussed in the pod.
Re: What is the best XML module to use?
by shady (Sexton) on Oct 06, 2005 at 17:11 UTC
    If the files expect to be large, have a look in XML::SAX. This module provides XML parsing by events, so it's make possible to parse large files without getting much of memory.

      XML::Twig is similar in that you will be able to delete elements or whole subtrees as soon as you no longer need them. XML::Twig will also fire event handlers when elements are completely parsed. I found it very easy to use.

      Take a look at the XML::Twig homepage. You will find a comparison between different XML modules and how well they are suited for different tasks.


      $\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print
Re: What is the best XML module to use?
by ambrus (Abbot) on Oct 06, 2005 at 20:27 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 07:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found