We have a large xml file representing many different items in a set of data. None of this xml uses attributes, and each item in the xml maps directly to an ActiveRecord model.
The simplest solution, to me, seems to be to convert each item to a ruby hash. Xpath seems to only complicate the conversion of each piece of data to the ActiveRecord model.
However, nokogiri is insanely popular. I'm trying to understand if there's a benefit that I'm missing.
As far as I see it, the two benefits of nokogiri (or other Xpath-based parsers) are query-ability and handling of attributes.
1) Are there other benefits I'm missing here?
2) For our use case, which is parsing xml and converting those individual documents into ActiveRecord models, is there any reason to not just convert the document to a ruby hash for easier handling?