From: Aaron Patterson Date: 2008-12-31T09:37:27+09:00 Subject: Re: Problems with scRUBYt On Wed, Dec 31, 2008 at 08:33:26AM +0900, Cs Webgrl wrote: > Hi. > > I am currently scraping a page with scRUBYt and am not getting the > results as expected. > > Instead of the correctly formatted xml document I'm getting the > following. > > > <1>book a > <1>book b > <1>book c > <2>chapter aa > <2>chapter bb > <2>chapter cc > <3>verse aaa > <3>verse bbb > <3>verse ccc > This is a correctly formatted XML document. You just have numbers for tag names. > My code looks like this: > > listing "//a[@id*='volume'>" do > book "//a[@class='1']" > chapter "//span[@class='2']" > verse "//a[@id*='3']" > end > > Any ideas? Have you tried something like this: book "//2[@id='whatevs']" That should get you access to the tags. Hope that helps! -- Aaron Patterson http://tenderlovemaking.com/