http://qs1969.pair.com?node_id=265272


in reply to Re: Help Using XML::Parser module
in thread Help Using XML::Parser module

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?

Replies are listed 'Best First'.
Re: Re: Re: Help Using XML::Parser module
by grantm (Parson) on Jun 12, 2003 at 09:26 UTC

    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.