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

Hi

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

//focusTag/*[descendant::descTag]

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

1 Like

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.

1 Like

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

1 Like