I'm pretty new to Ruby and Rails so I apologize if this has always been
discussed here.
I'm trying to figure out how to open an xml document and work with the data,
specifically using XPath statements.
I wasn't really successful looking for info on how to do this. Are there any
built-in classes (Ruby and/or Rails) that I can read up on? If not, what
about third party parsers?
Thanks in advance!
Kyle Heon
kheon@comcast.net
Kyle Heon wrote:
I'm pretty new to Ruby and Rails so I apologize if this has always been
discussed here.
I'm trying to figure out how to open an xml document and work with the data,
specifically using XPath statements.
I wasn't really successful looking for info on how to do this. Are there any
built-in classes (Ruby and/or Rails) that I can read up on? If not, what
about third party parsers?
Ruby includes REXML as part of the standard lib.
It includes XPath, so you can load a document and select content via XPath expressions.
http://www.ruby-doc.org/stdlib/libdoc/rexml/rdoc/
James
ยทยทยท
--
http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys