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
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.
| [reply] |
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. | [reply] |
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. | [reply] |
|
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
| [reply] [d/l] |
Re: What is the best XML module to use?
by ambrus (Abbot) on Oct 06, 2005 at 20:27 UTC
|
| [reply] |
|