XPath to CSS in Rust https://crates.io/crates/cssifier
8b3cd1ed81 | ||
---|---|---|
src | ||
.gitignore | ||
Cargo.toml | ||
README.md |
README.md
CSSIFIER_RS
Simple crate to convert XPath selectors to CSS selectors
based on cssify but rewrited in Rust (RiiR FTW).
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
- bug in 'contains' condition
- invalid XPath return empty String
- Compatible with WASM
Contributors are welcome :).