Excessive depth in document: XML_PARSE_HUGE option for xml2::read_html() in R Excessive depth in document: XML_PARSE_HUGE option for xml2::read_html() in R xml xml

Excessive depth in document: XML_PARSE_HUGE option for xml2::read_html() in R


I don't know if this is the right thing to do, but my question was answered by @hrbrmstr in one of his comments. I decided to post an answer so that people stumbling upon this question see that it has at least one answer.

The problem is basically solved by using the "HUGE" option when reading the html source. My problem was only related to when I loaded previously saved source. I did not find the same problem whilst using a "live" version of the application, i.e. reading the source from the website directly.

Anyway, now the August 2016 update of the excellent xml2 package permits the use of the HUGE option as follows:

doc <- read_html(pageSource, options = "HUGE")

For more information please read the xml2 reference manual hereCRAN-xml2

I wish to thank @hrbrmstr again for his valuable contribution.