Open mgirlich opened 1 year ago
Agreed
My mistake!
I misinterpreted it as length(node_set).
I do not fully understand this issue:
xml_length: should return the length of the node-set, which should be 0 if there are no nodes. The length is always a numeric value, which can be 0, or NA if its unknown.
It is xml_missing which is ill-defined: does it count as a node?
xml_length()
returns a vector the same length as its input. It's the length of each element of the nodeset, not the length of the nodeset.
xml_length(xml_nodeset())
returns0
but I feel this should rather beinteger()
which would also be consistent with e.g.xml_name()
.Created on 2023-08-29 with reprex v2.0.2