Devender P. wrote in post #1112339: > Hi, > I am trying to build a hash table from the xml file attached. I am > trying this with using "nokogiri" but open to any other suggestions. > > Basically the XML structure is a tree structure of the Design Hierarchy. > > When the TYPE is "HIER" it has "componentInstances" section and so on. > > I cannot predict how many levels deep it will go but would like to build > a hash and go from there. > > > Thanks If you insist on having a hash returned I'd recommend taking a look at the Ox gem. It will do that. That said, for big or complex XML files, I'd use Nokogiri. Instead of having to navigate through a hash, which is harder to do, Nokogiri lets you use CSS and XPath selectors to pick out just the parts you want. -- Posted via http://www.ruby-forum.com/.