Crates.io | xpath-cli |
lib.rs | xpath-cli |
version | |
source | src |
created_at | 2025-02-06 08:24:53.657635+00 |
updated_at | 2025-03-02 22:52:48.163685+00 |
description | Evaluate XPath selectors on XML or HTML documents |
homepage | https://github.com/jake-low/xpath-cli |
repository | https://github.com/jake-low/xpath-cli |
max_upload_size | |
id | 1545214 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
This is a command line tool called xpath
which evaluates XPath expressions on XML or HTML documents. It is a small wrapper around the excellent libxml2 library.
Use it for HTML
$ curl -L https://en.wikipedia.org/wiki/Special:Random | xpath '//h1/span/text()'
Vampire bat
Or XML
$ curl -L https://osm.org/api/0.6/changeset/157745397 | xpath '//changeset/tag[@k = "comment"]/@v'
This Starbucks was torn down, seemingly to have extra space to put Halloween candy on display.
This tool is written in Rust, so you'll need to install the Rust compiler and toolchain to build it.
Once you have, you can install this tool by running cargo install xpath-cli
Alternately, you can clone this repository, cd
into it, and run cargo install --path .
The code in this repository is offered under the ISC License. See the LICENSE file for details.