Convert CSS selector to XPATH

I saw an article on the Internet how to map a CSS selector to XPATH requests , so I'm trying to find out if there are any .NET libraries that can perform conversion / conversion. Please let me know if you have any links or any ideas on how to perform the mapping (if the library is not available).

+5
source share
1 answer

You can try the Css2Xpath library found here: https://bitbucket.org/MostThingsWeb/css2xpath/wiki/Home

I have never used it, but maybe you can share your experience with us.

Below is a small usage example:

String css = "div#test .note span:first-child";
String xpath = css2xpath.Transform(css);
+7
source

All Articles