I'm trying to do something unfamiliar, but here's the gist
I want to download xml from a page requiring authenitication (simple login/ pwd)
I can sort of get started with the following pseudocode:
This connects successfully.
Classes 'HTMLInternalDocument', 'HTMLInternalDocument', 'XMLInternalDocument', 'XMLAbstractDocument' <externalptr>
If I then try to use an xml2 command, such as:
library(xml2)
y <- read_xml(my_xml)
I end up with the following error
no applicable method for 'read_xml' applied to an object of class "c('HTMLInternalDocument', 'HTMLInternalDocument', 'XMLInternalDocument', 'XMLAbstractDocument')"
Finally, if I try:
y <- read_xml(my_url, authenticate("user", "password"))
It seems to fail to connect, believe because 'authenticate' doesn't work with read_xml
Finally, finally; in Hadley's fine webinar on
Getting Data in R, he mentions that xml is painful generally, but I'd love any direction to my specific problem above, or anything more general (like a tutorial and/or best practices) about going from xml to a data frame. Google has yielded little.
Thanks in advance.