From: "Devender P." Date: 2013-06-15T01:46:55+09:00 Subject: Re: NokoGiri XML Parser The problem with xpath or maybe i am not sure how to use it but if i say doc.xpath("tlv componentInstances") produces the list of all attirbutes inside the componentInstances without giving me the hierarchy. Here is what i have in my XML. Each cellname with a type "HIER" will have tag with additional attributes. A1 HIER... ... A2 HIER A3 MODEL.... B2 MODEL I want to be able to capture the componentInstances with respect to the parent cell. For-example for A2(cellname) A1 is the parent and for A3(cellname) A2 is the parent. For B2 the parent is A1. Please feel free to suggest a different XML structure if the paresers can handle them better. Thanks -- Posted via http://www.ruby-forum.com/.