floki icon indicating copy to clipboard operation
floki copied to clipboard

Feature Request: XPath selectors

Open liveresume opened this issue 8 years ago • 4 comments

It would be great to support XPath selectors.

Looks like https://github.com/expelledboy/exml gives us a head start.

What are your thoughts?

liveresume avatar Feb 25 '17 01:02 liveresume

Hi @liveresume!

TLDR: I think it's a good idea, but I prefer to have a separated lib/package for it.

I want to have xPath selectors, but I'm not sure if in this project or somewhere else that can be pluggable (like a floki-xpath project). This is because I want to keep the API as simple as possible. There is also another point that is implicit today: I'm only supporting HTML in Floki. With xpath we would have a bit of XML in the project. I'm not sure if I want to support that too.

Thank you! I will leave this open and think more about. If you have suggestions, please leave comments here.

philss avatar Mar 02 '17 03:03 philss

@philss this one's still open - can I ask what the plan is around support for this feature? Does a separate repo exist, will it be added to floki or discarded altogether?

ghalestrilo avatar Dec 13 '23 05:12 ghalestrilo

Does a separate repo exist, will it be added to floki or discarded altogether?

@ghalestrilo not, I don't think there is something out there. But I wish someone could implement this. It could be inside Floki, having a good API that separates from the default CSS selectors.

philss avatar Dec 18 '23 16:12 philss

NIce. Happy to take a look once I have some time

ghalestrilo avatar Dec 18 '23 17:12 ghalestrilo