xml-escape
Escape special XML characters
TLDR
Escape XML special characters
$ xml escape [text]
Escape from stdin$ echo "[<text>]" | xml escape
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.
SEE ALSO
xml-unescape(1), xml-format(1)
