You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found this by mistake, probably a friendlier error is warranted:
xml_find_all(read_xml("<a line1='1'></a>"), "@line1 = 1")
# Error in xml_nodeset(nodes) :# VECTOR_ELT() can only be applied to a 'list', not a 'logical'
The text was updated successfully, but these errors were encountered:
It's easy enough to throw a stopifnot(is.list(.)) somewhere, but I do pause to wonder the expected behavior in this case. What shouldxml_find_all() do when the search result is a logical vector?
On the one hand, the XPath search executed successfully, so it seems like a waste to trigger an error. OTOH, it may be peculiar to allow xml_find_all() to return a variety of types.
You probably wanted to use xml_find_lgl() here, but in general I'm not sure how xpath types should interact with these functions. I think the ideal would probably be to throw an informative error saying that you should use xml_find_lgl() etc instead.
Found this by mistake, probably a friendlier error is warranted:
The text was updated successfully, but these errors were encountered: