1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-04 02:35:24 +02:00
tldr/pages/common/xml-escape.md

17 lines
394 B
Markdown
Raw Normal View History

# xml escape
2021-08-23 21:26:03 -04:00
> Escape special XML characters, e.g. `<a1>` → `&lt;a1&gt;`.
2025-05-11 21:14:19 +03:00
> More information: <https://xmlstar.sourceforge.net/doc/UG/xmlstarlet-ug.html#idm47077139540960>.
- Escape special XML characters in a string:
2025-05-11 21:14:19 +03:00
`xml {{[esc|escape]}} "{{<a1>}}"`
- Escape special XML characters from `stdin`:
2025-05-11 21:14:19 +03:00
`echo "{{<a1>}}" | xml {{[esc|escape]}}`
- Display help:
2025-05-11 21:14:19 +03:00
`xml {{[esc|escape]}} --help`