Recently a user of my rNOMADS package in R began getting unexpected errors:
Error: Excessive depth in document: 256 use XML_PARSE_HUGE option [1]
We tracked the issue down to this command:
html.tmp <- xml2::read_html("http://nomads.ncep.noaa.gov/cgi-bin/filter_rap.pl?dir=%2Frap.20151120")
Upon following the link, it appears that the web page to be parsed is no larger than other ones that work fine, and much less than the 1 megabyte limit that should require the XML_PARSE_HUGE option. Furthermore,
xml2::read_html
actually has no XML_PARSE_HUGE option anyway. The only other potential solution, described here, is not appropriate for an official R package.
What is the cause of this error, and is it possible to resolve it without resorting to solutions outside the official CRAN repository?