27 lines
504 B
Markdown
27 lines
504 B
Markdown
# CSSIFIER_RS
|
|
|
|
## Simple crate to convert XPath selectors to CSS selectors
|
|
|
|
based on [cssify](https://github.com/santiycr/cssify) but rewrited in Rust (RiiR F4W).
|
|
|
|
### dependencies:
|
|
- [Regex](https://crates.io/crates/regex)
|
|
|
|
### 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 selectors panic
|
|
|
|
Contributors are welcome :).
|