No such thing as a small change | |
PerlMonks |
Re: XML Transaction - random access.by andreychek (Parson) |
on Jun 29, 2001 at 22:41 UTC ( [id://92756]=note: print w/replies, xml ) | Need Help?? |
If thats as big as it's going to get, you could always consider using XML::Simple to transform the XML data into a hash. The biggest problem with that would be in a case where your XML grew to be large -- you'd end up using a lot of RAM. To use XML::Simple, you can just use code like this: And that would provide you with a nested hash containing all your data, properly structured (as opposed to flattened). From that point it wouldn't be too difficult to write code to randomly access the keys/data within. And by all means, no one could ever go wrong using XML::Twig for the task if you were concerned about the size of you XML document :-) -Eric Update: Added code example.
In Section
Seekers of Perl Wisdom
|
|