Topic: Hpricot and a 3 level deep node XML has an example of a root level node and a way of parsing it for xml.

Can anyone point me to an example digging through a 3 node level? How do you iterate through it?

# 1 node sample iteration
(doc/:product).each do |xml_product|
  product =
  for field in FIELDS
    product[field] = (xml_product/field.intern).first.innerHTML

# 3 node sample
        <Name>New York</Name>

Last edited by shajused (2007-10-12 14:15:18)

Sam G.