Need help parsing XML using Perl

My hands are full and I am in need of quick help writing a Perl script to parse XML and convert the contents to an HTML page. Pls PM me so I can provide all the details.


You’re better off just posting the details here. That is… if you want quick help. Or any help at all for that matter.

OK, below is a snippet of the XML. I need a script (not a how-to guide) that will take the contents of that XML and generate an HTML code to display it. The part about generating the HTML is easy enough. It’s the reading of the XML and picking out the elements that I need help with.


<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:media="">
    <title>Title Goes Here....</title>
    <description>This feed contains data from</description>
    <lastBuildDate>Mon, 14 Dec 2009 04:51:33 GMT</lastBuildDate>
      <title>Item Title Goes Here</title>
      <description>Description Goes Here</description>
      <enclosure url="" duration="122" type="application/x-shockwave-flash" />
      <media:content url="" type="video/x-flv" expression="sample" duration="122" bitrate="600" lang="eng" />
      <media:title type="plain">Media title goes here</media:title>
      <media:description type="html">Media description goes here</media:description>
      <media:thumbnail url="" width="75" height="75" time="00:00:50" />
      <media:category label="Art/Crafts">Art/Crafts</media:category>
      <media:keywords>List of keywords go here, more keywords, still more keywprds</media:keywords>
      <media:player url=""><![CDATA[<div style='text-align:center'><object width='480' height='401' id='MediaPlayer' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'><param name='allowfullscreen' value='true'/><param name='allowScriptAccess' value='always'/><param name='movie' value=''/><embed name='MediaPlayer' src='' type='application/x-shockwave-flash' width='480' height='401' allowfullscreen='true' allowScriptAccess='always'></embed></object><br/><a href='' style='font-family: Verdana;font-size: 10px;' target='_blank'>Title Goes Here</a></div>]]></media:player>
      <pubDate>Mon, 14 Dec 2009 04:51:33 GMT</pubDate>
        <title>Title Goes Here</title>

There is a perl package XML::Simple which you can give an XML data stream (by means of a file name if you want) and it will return a HASH.