in reply to Getting started with XML

If you are getting serious about things I think you should look at XML::LibXML. I believe it is built off a C library so it is a little faster if nothing else. There was another thread you may find useful: Question on XML::LibXML.... DTD's are the old (and still very prevalent way) of validating XML (the newer one being schemas). I don't see why should need to use either from what you have described. You may want to look in CPAN for the ATOM specific stuff. However when I tried (more for RSS than ATOM) that I ended up falling back onto XML::LibXML. Another approach might be to try converting to a perl structure that you feel familiar with via, say, XML::XML2JSON.

Replies are listed 'Best First'.
Re^2: Getting started with XML
by weismat (Friar) on Oct 22, 2009 at 10:40 UTC
    I totally agree to use XML::LibXML and you should learn to use XPath which is a query language for the XML tree. XML Simple is really slow and it is way too easy to write unstable code when the structure of the XML changes.

      It's only really slow once the XML gets big and can't fit in memory.

      When the structure of the XML changes all bets are off. Each module and especially each way you use that module will allow for some changes to go unnoticed, some to break the script and some to cause incorrect results. Including of course XML::LibXML and XPath. There are types of changes that are more likely to force you to change something if you use one module and get away with old script if you use another, but if the XML changes you should ALWAYS review the change and your script and make sure it still works and still returns the right data.

      Jenda
      Enoch was right!
      Enjoy the last years of Rome.