Peter, as guys, indicated that you can do this with Selenium. I also like to use the excellent selectr package. The idea is to briefly interact with the site, and then the rest elsewhere. squawkData should contain everything you need.
# RSelenium::startServer() # if needed require(RSelenium) remDr <- remoteDriver() remDr$open() remDr$setImplicitWaitTimeout(3000) remDr$navigate("http://epl.squawka.com/stoke-city-vs-arsenal/01-03-2014/english-barclays-premier-league/matches") squawkData <- remDr$executeScript("return new XMLSerializer().serializeToString(squawkaDp.xml);", list()) require(selectr) example <- querySelectorAll(xmlParse(squawkData[[1]]), "crosses time_slice") example[[1]] <time_slice name="0 - 5" id="1"> <event player_id="531" mins="4" secs="39" minsec="279" team="44" type="Failed"> <start>73.1,87.1</start> <end>97.9,49.1</end> </event> </time_slice>
DISCLAIMER I am the author of the RSelenium package. The main vignette for operations can be found on the Basics of RSelenium and RSelenium: testing brilliant applications .
Additional information can be easily accessed with selectr:
> xmlValue(querySelectorAll(xmlParse(squawkData[[1]]), "players #531 name")[[1]]) [1] "Charlie Adam" > xmlValue(querySelectorAll(xmlParse(squawkData[[1]]), "game team#44 long_name")[[1]]) [1] "Stoke City"
UPDATE:
To process the example in a data frame, you can do something like
out <- lapply(example, function(x){
source share