oxml
🌐 EN , Change language

Documentation

oxml-cli — Command Line XML Tool

Run XPath queries, validate documents, and process XML streams in your shell and CI pipelines.

Installation

Install oxml-cli with Cargo:

cargo install oxml-cli

Verify the installation:

oxml --version

XPath Querying

Execute XPath 1.0 expressions directly against XML files:

# Extract book titles from a catalog
oxml query '//book[@available="true"]/title' catalog.xml

# Count elements matching a pattern
oxml query --count '//item' feed.xml

# Output results as structured JSON
oxml query --json '//record' data.xml

Piping & CI

Validate well-formedness and pipe data through standard Unix streams:

# Check document well-formedness
oxml check document.xml

# Stream remote feeds directly into XPath filters
curl -s https://example.com/rss.xml | oxml query '//item[1]/title'