Displaying 1 result from an estimated 1 matches for "publicationcalendarlink".
2012 May 11
0
Using xpathapply or getnodeset to get text between two distinct tags
...links
doc<-scrape(url=hansard, parse=TRUE, follow=TRUE)
#Not sure what exactly this does, but it is necessary
doc<-doc[[1]]
#Get the xmlRoot directory
doc<- xmlRoot(doc)
#Get nodes that contain only the links to each day's transcripts
links<- getNodeSet(doc, "//a[@class='PublicationCalendarLink']/@href")
links<-matrix(links)
#Paste those href links to the root URL
links<-apply(links, 1, function(x) paste('http://www.parl.gc.ca', x, sep=''))
#Inspect
links[1]
#Scrape text from first URL in 'links'
oneday<-scrape(links[1])[[1]]
#Return p/i elements...