This is an equivalent to #409 in the other direction. For consistency it would be nice to have such a functional equivalent. FWIW, we are also finding `xml_parent()` much more performant than `xml_find_{first,all}(x, "parent::*")`: https://github.com/r-lib/lintr/issues/2718#issuecomment-2657368697 So presumably the same could be true of `xml_ancestor()`.