They serve this information in XML format. I'm having a hard time writing perl code that will parse the XML. I've been all over the documentatino for XML::Parser and XML::Simple but can't seem to come up with code that will work for me. Frankly, the modules are like "Greek to me".
Anybody have experience in this department?
What did I do? I taught myself how to use the XML::Parser perl module. There are loads of guides on the net about this module and similar modules, but none of them made sense to me. The module is very flexible and there are lots of "styles" you can use when implementing it. I wasn't sure which one to pick, and how to implement the one I picked. Finally, I found a good tutorial that I could halfway decifer...
[perlmonks.thepen.com...]
and from adaption of the example on that page, I came up with my solution.
I found that the trick was to use the default style "Tree", and assign my own custom subroutines to handle the the start of an element, the end of an element, and character text. After I figured that out, it was just a matter of untangling the mess of hashes that XML::Parser uses to keep the XML data in.
I couldn't tell what you were trying to do from your post. I guess I'd need more details.
If you're going to be parsing XML, then you should use the XML::Parser module, that's for sure.
If well written this will end up being far more efficient than using an XML parser module and it will get around the fact that many search engine feeds display non-standard XML that will break any standard parser.