1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-09 06:46:00 +02:00
tldr/pages/common/xml-escape.md
2025-05-11 21:14:19 +03:00

16 lines
394 B
Markdown

# xml escape
> Escape special XML characters, e.g. `<a1>` → `&lt;a1&gt;`.
> More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139540960>.
- Escape special XML characters in a string:
`xml {{[esc|escape]}} "{{<a1>}}"`
- Escape special XML characters from `stdin`:
`echo "{{<a1>}}" | xml {{[esc|escape]}}`
- Display help:
`xml {{[esc|escape]}} --help`