From: ChrisH Date: 2007-06-07T02:45:04+09:00 Subject: Re: Using ADO to connect to an Access database in Ruby On Jun 5, 8:37 am, Andy Robbo wrote: > Right , very close to achieving my objective , thanks very much for > everyones input so far , its really helped me along the learning curve > with Ruby. > > I'm down to one last problem ... > > So far , I've connected to my Access database and pulled out a list of > URLs and there ID's , i've used the URL in the code fromAlexato obtain > the page rank. > > Now all I have to do is somehow parse the XML from theAlexadata back > into Ruby to insert it back into my database... > > This is the XML that i'm trying to parse > > Response: > > > xmlns:aws='http://alexa.amazonaws.com/doc/2005-10-05/'> xmlns:aws='http://awis.amazonaws.com/doc/2005-07-11'>asldkfjaslkdjfasldfj > > rbstardynamic.co.uk/ > 5976859 > > xmlns:aws='http://alexa.amazonaws.com/doc/2005-10-05/'>Success"5" > "essex-electrical.co.uk" > > I'm trying to parse the rank # (in this case "5976859") > > any clues ? > > -- > Posted viahttp://www.ruby-forum.com/. I think the simplest way would be to store this XML in an String and then: start = xml.index('') + ''.length fin = xml.index('') rank = xml[start...fin] Of course you could explore RegEx or an XML lib (Hpricot, ReXML,...) Cheers Chris