LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xml

XMLStarlet command-line XML toolkit

TLDR

Validate XML
$ xml val [file.xml]
copy
Format/pretty print
$ xml fo [file.xml]
copy
XPath query
$ xml sel -t -v "[//element]" [file.xml]
copy
Transform with XSLT
$ xml tr [transform.xsl] [file.xml]
copy
Edit in place
$ xml ed -u "[//node]" -v "[value]" [file.xml]
copy

SYNOPSIS

xml command [options] files

DESCRIPTION

xml is the main command of XMLStarlet, a comprehensive command-line XML toolkit for querying, editing, validating, and transforming XML documents. It provides a set of subcommands that cover common XML processing tasks without requiring a full programming language.Key subcommands include val for validating XML against DTDs or schemas, fo for pretty-printing and reformatting XML, sel for selecting data using XPath expressions, ed for editing XML elements and attributes in place, and tr for applying XSLT transformations. Each subcommand has its own set of options tailored to its specific operation.XMLStarlet is designed for shell scripting and automation, allowing XML processing tasks to be integrated into pipelines and build scripts. It reads from files or stdin and writes to stdout, following Unix conventions for composability.

PARAMETERS

val

Validate.
fo
Format.
sel
Select (XPath).
tr
Transform.
ed
Edit.
-t -v XPATH
Template value.

INSTALL

sudo dnf install xmlstarlet
copy
sudo pacman -S xmlstarlet
copy
sudo apk add xmlstarlet
copy
sudo zypper install xmlstarlet
copy
brew install xmlstarlet
copy
nix profile install nixpkgs#xmlstarlet
copy

CAVEATS

XMLStarlet specific. Complex XPath syntax. Many subcommands.

HISTORY

XMLStarlet (xml command) is a command-line XML toolkit for querying, validating, and transforming XML.

SEE ALSO

xmllint(1), xsltproc(1), jq(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid