iterate through node attributes

kevid <[email protected]> Mon, 8 Mar 2010 08:49:34 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.xml
Organization http://groups.google.com
Message-ID <b8f39130-2873-4801-9eef-83800786e629@q23g2000yqd.googlegroups.com>
hi all,

please i have this xml document below. i want  to a assign it to a
variable  a hash of the xml document. the hash will be in the format:

"attribute_name"=> "attribute_value"

I would wand to use Xpath. Any clue from anyone is welcomed

<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok" version="1.0">
<event 	id="12995" name="The Samples" description=""
start_date="2005-04-16"
    end_date="" start_time="19:00:00" end_time=""
    personal="0" selfpromotion="0" metro_id="1" venue_id="155"
    user_id="8172" category_id="1" date_posted="2005-02-14"
    latitude="37.765" longitude="-122.396"
geocoding_precision="address"
    geocoding_ambiguous="0" venue_name="The Wiltern"
    venue_address="3790 Wilshire Blvd" venue_city="Los Angeles"
    venue_state_name="California" venue_state_code="ca"
    venue_state_id="5" venue_country_name="United States"
    venue_country_code="us" venue_country_id="1"
    venue_zip="90010"
    ticket_url="" ticket_price="" ticket_free="1" photo_url="" />
<event 	id="12996" name="The Samples" description=""
start_date="2005-04-16"
    end_date="" start_time="23:00:00" end_time=""
    personal="0" selfpromotion="0" metro_id="1" venue_id="155"
    user_id="8172" category_id="1" date_posted="2005-02-14"
    latitude="37.7665" longitude="-122.43"
geocoding_precision="address"
    geocoding_ambiguous="0" venue_name="The Wiltern"
    venue_address="3790 Wilshire Blvd" venue_city="Los Angeles"
    venue_state_name="California" venue_state_code="ca"
    venue_state_id="5" venue_country_name="United States"
    venue_country_code="us" venue_country_id="1"
    venue_zip="90010"
    ticket_url="" ticket_price="" ticket_free="1" photo_url="" />
</rsp>