New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xml_find_first de-duplicates results -- regression? #194
Comments
Here is the code that used to work with an older version of xml2 library(xml2)
x <- read_xml("NuGet.xml")
logs <- xml_find_all(x, "/*/package/version/log")
day <- Sys.Date() - 60
logs <- logs[as.Date(xml_attr(logs, "d")) > day]
version <- xml_find_one(logs, "..")
package <- xml_find_one(version, "..")
ds <- data.frame(
Name = xml_attr(package, "name"),
Version = xml_attr(version, "name"),
Date = as.Date(xml_attr(logs, "d")),
Count = sapply(
as.numeric(xml_attr(logs, "n")),
function(x) { if (x <= 8) 3 else log(x, 2) }
)
) With the latest xml2 it fails:
because The code uses the obsolete |
Somewhat related SO question: https://stackoverflow.com/q/46435629/323582 |
Thank you! How soon is the package usually released after a fix? Question: is |
Issue Description and Expected Result
xml_find_first
seemingly de-duplicates results, though the help says"The output is always the same size as the input":
Reproducible Example
p
is expected to have 4 nodes, as the inputv
.But it has 2, i.e. the result is de-duplicated.
The text was updated successfully, but these errors were encountered: