[Rails] Parsing RDF coming from a URL
Werner Ramaekers
werner.ramaekers at gmail.com
Wed Feb 1 14:56:26 GMT 2006
Hello,
i'm writing an application that needs geocoding information for locations
outside of the US.
I'm using the brainoff.com geocoding service
mappoint = Net::HTTP.new('brainoff.com', 80)
response = mappoint.get('/geocoder/rest/?city=Gent,BE')
logger.debug response.body
and the body of the response is in the following form :
<rdf:RDF xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<geo:Point>
<geo:long>3.7166667</geo:long>
<geo:lat>51.05</geo:lat>
</geo:Point>
</rdf:RDF>
Now my question is : how do i parse this RDF to get to the long and lat
values ?
Is there a library available or am i on my own to get to the long and lat
values ?
thanks for your help
Werner
--
----------------------------------------------------------------------
ir. Werner Ramaekers
Read my Blog at http://www.werner.be
"May the source be with you."
----------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060201/e8c4dcd3/attachment.html
More information about the Rails
mailing list