1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/xml-escape.md
2024-10-12 10:02:00 +02:00

16 lines
339 B
Markdown

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