Hi all, Using the XML package, I'm not able to parse some html webpages. Here is my code and the error message: library("XML") url <- "http://www.huffingtonpost.com/social/GraniteSkyline?action=fans" doc <- htmlParse(url) Error: Namespace prefix ??? of attribute (null) is not defined I've searched a lot on the Internet, but it's really difficult to find something useful for R. Thanks for your help! Julien
Le jeudi 22 mars 2012 ? 17:20 +0100, Julien Velcin a ?crit :> Hi all, > > Using the XML package, I'm not able to parse some html webpages. Here > is my code and the error message: > > library("XML") > url <- "http://www.huffingtonpost.com/social/GraniteSkyline?action=fans" > doc <- htmlParse(url) > > Error: Namespace prefix ??? of attribute (null) is not defined > > I've searched a lot on the Internet, but it's really difficult to find > something useful for R.What versions of R and XML are you using? The code you provided works fine here (R 2.14.1 x86_64 and XML 3.9-4 on Fedora 16). sessionInfo() will help us. BTW, see ?RSiteSearch to search for R content on the Web. Cheers
Sorry for the multiple messages. ------ I use mac OS 10.5.8 with this version of R: R version 2.14.1 (2011-12-22) Platform: i386-apple-darwin9.8.0/i386 (32-bit) I've tried the command "RSiteSearch", but with no result. BTW, I recall that the code I've posted works for some websites. Julien
Seemingly Similar Threads
- parse an HTML page with verbose error message (using XML)
- reading tables from multiple HTML pages
- How to pass parameters to htmlParse Bank of Canada html pages
- htmlParse (from XML library) working sporadically in the same code
- Getting htmlParse to work with Hebrew? (on windows)