Open
Description
Currently I observe that read_xml(x)
throws an error if x
is a textConnection()
.
library("xml2")
s <- '<?xml version="1.0" encoding="UTF-8"?>\n<outer>\n<inner>Inner</inner>\n</outer>'
con <- textConnection(s)
x <- read_xml(con)
Error in readBin(3L, "raw", 65536L) :
can only read from a binary connection
I'm aware you could use x <- read_xml(paste(readLines(con), sep = "\n"))
as a workaround but this seems like an easy case to support.
I'm putting together a pull request that adds a read_xml.textConnection()
S3 method.
Metadata
Metadata
Assignees
Labels
No labels