Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
fixed xml parsing due to httr::content change
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Feb 7, 2016
1 parent d349d02 commit 1e7240b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/zzz.R
Expand Up @@ -29,7 +29,7 @@ bhl_GET <- function(as, args, ...){
out <- GET(bhl_url(), query = args, ...)
stop_for_status(out)
res <- switch(as,
xml = xmlSize(xpathSApply(content(out), "//Result")[[1]]),
xml = xmlSize(xpathSApply(xmlParse(content_utf8(out)), "//Result")[[1]]),
json = length(jsonlite::fromJSON(content_utf8(out))$Result),
list = length(jsonlite::fromJSON(content_utf8(out))$Result),
table = length(jsonlite::fromJSON(content_utf8(out))$Result))
Expand Down

0 comments on commit 1e7240b

Please sign in to comment.