tldr/pages/common/xml-escape.md

17 lines
338 B
Markdown
Raw Normal View History

# xml escape
2021-08-24 02:26:03 +01:00
> Escape special XML characters, e.g. `<a1>` → `&lt;a1&gt;`.
2021-08-15 12:19:09 +01:00
> More information: <http://xmlstar.sourceforge.net/doc/xmlstarlet.pdf>.
- Escape special XML characters in a string:
`xml escape "{{<a1>}}"`
- Escape special XML characters from `stdin`:
2023-06-14 16:32:31 +01:00
`echo "{{<a1>}}" | xml escape`
- Display help:
`xml escape --help`