Forum: Ruby on Rails Parsing RDF coming from a URL

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Werner Ramaekers (Guest)
on 2006-02-01 16:56
(Received via mailing list)

i'm writing an application that needs geocoding information for
outside of the US.
I'm using the geocoding service

mappoint ='', 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=""

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
values ?

thanks for your help


ir. Werner Ramaekers

Read my Blog at
"May the source be with you."
Avdi G. (Guest)
on 2006-02-01 18:48
(Received via mailing list)
Technically that's RDF/XML, and you should be able to parse it with any
Ruby's XML libraries - REXML, XMLParser, libxml, etc.  REXML is part of
standard Ruby distribution.
Steve L. (Guest)
on 2006-02-01 19:30
(Received via mailing list)
You could also take a look at Ruby integration with Redland if you want
do any Sparql related stuff with your RDF:

Here is a good article if you are new to Sparql/Semantic Web with RDF as
Erik H. (Guest)
on 2006-02-02 17:54
(Received via mailing list)
There is also Rena[1] and Semitar[2]


I don't recommend using just an XML parser for ingesting RDF.  That's
sorta like using regex to parse HTML.  It's really better to deal
with it as the graph model it is.  Sure, it could be done solely with
an XML parser in this simplistic case, and maybe that is
pragmatically a fine way to go.  I've often parsed HTML with regex
too :)

This topic is locked and can not be replied to.