Reading XML docs (Ruby/Rails)

K

Kyle Heon

------=_NextPart_000_0003_01C579C6.4F612820
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

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
(e-mail address removed)



------=_NextPart_000_0003_01C579C6.4F612820--
 
J

James Britt

Kyle said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,048
Members
48,769
Latest member
Clifft

Latest Threads

Top