R not accepting xpath query



Hi I am using the XML package in R to scrape html pages. The page of interest is http://ift.tt/1q29dWG and on that page there is a sequence of which when inspecting the element in chrome, the xpath is



//*[@id="gi_225903367_141"]


however when I try to pull this using:



xpathSApply(htmlParse(fasta.url.content),"//*[@id="viewercontent1"]/pre")
Error: unexpected symbol in "xpathSApply(htmlParse(fasta.url.content),"//*[@id="viewercontent1"


I get the above error.


Is the XML package being fussy with the xpath?


No comments:

Post a Comment