Using HXT: how to select childs of an element which have a certain descendant


I am trying to find the Haskell HXT equivalent to this XPATH expression:


Not sure how to do this.

deep can bring me to the focusTag, getChildren select the childs

deep (isElem >>> hasName focusTag) >>> getChildren

But then?

Thanks in advance

It’s been a while since I used arrows, but I think you want something like containing, or maybe the equivalent >>> filterA pred if that’s easier to work into your code.

Thanks a lot. This points me in the right direction.