good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Pasring XML into a simple hashby Desdinova (Friar) |
on Jun 21, 2001 at 08:56 UTC ( [id://90287]=perlquestion: print w/replies, xml ) | Need Help?? |
Desdinova has asked for the wisdom of the Perl Monks concerning the following question:
For the the first in almost a year of being here I am posting a question.. that says alot about much info is already here.. but anyway I have a "XML like" file in this format: And so on What I would like to be able to do is read in the first "post" and assign the content to a hash with the elements as keys so that i can access the data like print "City: $hash{location} \n"; Then go on to the next "post" and repeat the proccessing of the data inside it. I have looked at the man pages for XML::Parser and XML::Simple but I can't figure out how to go through one post at a time. I figure there is something simple about all this that I am just missing and would appreciate if some helpful monk could point my brain in the right direction. Thanks
Back to
Seekers of Perl Wisdom
|
|