LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xml-escape

Escape special XML characters

TLDR

Escape XML special characters
$ xml escape [text]
copy
Escape from stdin
$ echo "[<text>]" | xml escape
copy

SYNOPSIS

xml escape [options] [text]

DESCRIPTION

xml escape escapes special XML characters. Part of xmlstarlet toolkit. Converts <, >, &, ', " to their XML entity equivalents for safe inclusion in XML documents.

PARAMETERS

text

Text to escape.

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

SEE ALSO

Copied to clipboard
Kai