|There's more than one way to do things|
extract tag content from VLC webserver via XML::Rulesby rainforest1155 (Initiate)
|on Jun 25, 2013 at 09:32 UTC||Need Help??|
rainforest1155 has asked for the
wisdom of the Perl Monks concerning the following question:
I'm new to Perl and was trying to extract the contents of a specific tag from my VLC webserver xml status page. Here's an example of the XML (I removed a couple of tags in the sections I'm not interested in to keep things shorter:
What I'm interested in is just the contents of the <info name="now_playing"> tag which contains artist, title and album.
I already have some code that does return all the <info> tags but I'm not sure how to specifically return just the "now_playing" tag content.
This is the code I managed to hack together so far using parts of code I found in the monastry:
I haven't been able to figure out how to filter the results to just the portion I'm interested to. I did look at the XML::Parser docs on cpan.org and have the feeling it's in there, especially the home / office phone example that's touched on in the synopsis, but I can't translate that into any working code.
Thanks for any assistance you can offer.