I've used this http://www.oopsconsultancy.com/software/xmltask/ in the past to process XML with ANT. I threw together a quick sample of getting each individual attribute.
ref = @{ref}
Not sure if this will suit your needs, but it does work to get the attribute values individually.