xml with Rails?

That’s going to depend at least partially on what it is you want to do with rails. Rails will generate XML from ActiveRecord objects (and accept some XML as input) by default. Check out:



Rails itself makes use of Builder, so for anything more complex you’d be best off checking that out first.



to do is simple read/write and search in an XML file, like xpath, I wonder if there are already some predefined classes or modules that can perform the task?

if you need Xpath, then you can try with REXML. It supports DOM,Xpath,SAX and StaX... for an easier XML parser (a XML to ruby objects mapper) you can try simpleXml. There are more libraries out there, but these two come bundled with any RoR installation, so there is a decent documentation and they work out-of-the-box


javier ramirez