Hi all,
I need to hit a URL that returns me a xml file,which I should read and
parse.
How could I do it,access the URL,retrieve the content of the response
and process it?
Regards,
Rafael Roque
···
--
Posted via http://www.ruby-forum.com/.
Hi all,
I need to hit a URL that returns me a xml file,which I should read and
parse.
How could I do it,access the URL,retrieve the content of the response
and process it?
Regards,
Rafael Roque
--
Posted via http://www.ruby-forum.com/.
Read about the standard library package "open-uri" to retrieve the URL
contents, and "Nokogiri" (gem) or "Hpricot" (gem) or "REXML" (standard
library package) to process the XML
http://www.ruby-doc.org/stdlib/
http://nokogiri.rubyforge.org/nokogiri/
http://github.com/whymirror/hpricot/tree/master
At 2009-09-02 10:28AM, "Rafael Roque" wrote:
Hi all,
I need to hit a URL that returns me a xml file,which I should read and
parse.
How could I do it,access the URL,retrieve the content of the response
and process it?
--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous
You can use open-uri for fetching the content. Then you can use nokogiri for processing the XML response.
Here are some docs that will get you started:
Hope that helps.
On Sep 2, 2009, at 7:28 AM, Rafael Roque wrote:
Hi all,
I need to hit a URL that returns me a xml file,which I should read and
parse.
How could I do it,access the URL,retrieve the content of the response
and process it?
---
Aaron Patterson
http://tenderlovemaking.com