Node with specific attribute
obj.xpath("//attribute[@class='metadata']")
Quickly parse with Nokogiri
This is a reminder for myself because I always forget the different ways for getting at data with Nokogiri.
doc = Nokogiri::XML(xml_doc)
objects = doc.xpath("//object")
value = objects.first.text
attribute = objects.first['attribute_name']