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
as_list.xml_node drops element names if any xml attributes exist #115
Comments
I am encountering the same issue with code that worked prior to xml2 v1.0.0 but now fails. I know this particular line of code was not changed in in the v1.0.0 release, but it appears to be interacting with other changes (probably in Two difference changes could resolve this (for my use case):
if (length(attr) > 0)
attributes(out) <- c(attributes(out), as.list(attr)) The latter is probably better. Should I submit a PR? |
There's already a PR basically done for this issue, just needs to be merged. The original issue was motivated by xml2 v1.0.0 breaking |
Yes, it should. Thanks for that! |
Sorry for the delay in merging, the current master should now be fixed. |
Reproducible example:
The issue appears to be line 58 in:
attributes(out) <- as.list(attr)
which overwrites the names that were previously stored by line 52.
The text was updated successfully, but these errors were encountered: