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

Re: Help Using XML::Parser module

by edan (Curate)
on Jun 11, 2003 at 11:51 UTC ( #265003=note: print w/replies, xml ) Need Help??


in reply to Help Using XML::Parser module

If you're a newbie to perl and XML, I wouldn't recommend using XML::Parser (actually, I'm not sure I would recommend it even if you weren't a newbie). Perhaps something like XML::Twig (by our own mirod) will present an easier interface to get you started parsing XML in perl... there's also XML::Simple, depending on how basic your XML parsing needs are...

HTH

--
3dan

Replies are listed 'Best First'.
Re: Re: Help Using XML::Parser module
by dsm (Novice) on Jun 12, 2003 at 04:10 UTC
    Thanks 3dan, I've decided to use XML::Simple, but just have one question which you (or perhaps someone else) may be able to answer...When writing XML files using this module, must the data be stored in a hash? or can you just tell it which parts is the <tags> and which part is XML bit?

      Yes, if you want to use XML::Simple to output XML then you do need to store the data in a hash. If it's not already in a hash then that might be a roundabout way of achieving your aims. You may also find that the loss of ordering which results from using a hash is a problem - if you don't get the results you want quickly then try another approach, XML::Simple's forte is really the reading side of things. There are one or two modules specifically for writing XML but I have no experience with them, print works for me.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2022-11-30 10:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?