-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
xml_length(xml_nodeset()) returns 0 but I feel this should rather be integer() which would also be consistent with e.g. xml_name().
library(xml2)
(ns1 <- xml2:::xml_nodeset())
#> {xml_nodeset (0)}
xml_length(ns1)
#> [1] 0
(ns2 <- xml2:::xml_nodeset(list(xml_missing()), deduplicate = FALSE))
#> {xml_nodeset (1)}
#> [1] <NA>
xml_length(ns2)
#> [1] 0Created on 2023-08-29 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior