XPath to CSS in Rust https://crates.io/crates/cssifier
Go to file
kirbylife 7cce076231 added known issues 2021-03-07 20:08:57 -06:00
src added known issues 2021-03-07 20:08:57 -06:00
.gitignore Initial commit 2021-03-07 18:50:42 -06:00
Cargo.toml add readme file 2021-03-07 19:50:16 -06:00
README.md added known issues 2021-03-07 20:08:57 -06:00

README.md

CSSIFIER_RS

Simple crate to convert XPath selectors to CSS selectors

based on cssify but rewrited in Rust (RiiR F4W).

dependencies:

Usage

The usage is simple:

cssifier("//a/b")
// Some("a b")

cssifier("//a/b[@id='hello']")
// Some(a b#hello)

cssifier("//a/b[contains(text(), 'hello')]")
// Some(a b:contains(hello))

Known issues

[ ] invalid XPath return empty String

Contributors are welcome :).