Search by XPath in Codemirror 6

Just curious if there’s a way to search by XPath in Codemirror 6. I believe there was an extension that enabled this in previous versions.

Doesn’t ring a bell—in fact, I’m can’t really imagine what searching by xpath would mean. You mean in an XML document, moving to the next matching node or something? That’s definitely never been provided by the core library.

Oh interesting, I must be thinking of something else.

But yeah, something similar to the new SearchCursor, but accepts an XPath instead. It would only be compatible with XML languages for obvious reasons. I’ve found a workaround for now, and in fact this might be such a niche use case that adding the functionality might not even make sense.

I am also looking to implement this so maybe it isn’t so niche. Do you have any pointers for what you did for your work around?