Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Kindly suggest a good starting point for XML Parsing.

by mrguy123 (Hermit)
on Dec 29, 2011 at 15:13 UTC ( #945514=note: print w/ replies, xml ) Need Help??


in reply to Kindly suggest a good starting point for XML Parsing.

All the modules in the above post are great, but if you need to parse a simple XML file then XML::Simple is a very simple and effective module to know.
Regarding books, the O'Reilly books are usually pretty good
Good Luck
MrGuy


Comment on Re: Kindly suggest a good starting point for XML Parsing.
Re^2: Kindly suggest a good starting point for XML Parsing.
by sundialsvc4 (Monsignor) on Dec 29, 2011 at 15:41 UTC

    For what it's worth, XML::Simple has “left me standing at the altar” a few more times than I personally care for.   XML-related tasks that start out as “simple” just don’t stay that way for long, and it is rather annoying to run into the limits of your tool before you run into the limits of your project.

      I agree with you that XML::Simple is sometimes a bit, um, simple, and it is highly recommended to learn the more powerful XML parsers mentioned above.
      Still, for those rare cases where a very easy to use and "simple" tool can be useful, its a nice thing to know.

      it is rather annoying to run into the limits of your tool before you run into the limits of your project.

      Yes it is. I'm currently in the planing phase on how to rewrite my big projects XML config parser. Which, incidently, is XML::Simple based. While it works quite nicely, it takes some, uh, not-so-nice workaround thinking when writing the config files itself. I must admit, when i started this project, it was the first time i used XML for configuration files. And it was Plug-and-Play, really and saved me quite some time to get started.

      Still, i'll probably keep XML::Simple around for all those small convert-this-into-that tools. For the typical ten-settings-and-five-comments config files for these kind of tools it is just ideal.

      So, XML::Simple is a two sided sword. It highly depends on your requirements.

      BREW /very/strong/coffee HTTP/1.1
      Host: goodmorning.example.com
      
      418 I'm a teapot
        As are all fine weapons . . . this is understood.
Re^2: Kindly suggest a good starting point for XML Parsing.
by Jenda (Abbot) on Dec 30, 2011 at 12:29 UTC

    See Simpler than XML::Simple for a discussion of some of the problems with XML::Simple and a solution.

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2014-08-29 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (289 votes), past polls