2021-08-16 13:23:55 +01:00
|
|
|
# xml escape
|
2021-08-14 23:17:52 +01:00
|
|
|
|
2021-08-24 02:26:03 +01:00
|
|
|
> Escape special XML characters, e.g. `<a1>` → `<a1>`.
|
2021-08-15 12:19:09 +01:00
|
|
|
> More information: <http://xmlstar.sourceforge.net/doc/xmlstarlet.pdf>.
|
2021-08-14 23:17:52 +01:00
|
|
|
|
2021-08-15 02:49:20 +01:00
|
|
|
- Escape special XML characters in a string:
|
|
|
|
|
2021-08-16 13:23:55 +01:00
|
|
|
`xml escape "{{<a1>}}"`
|
2021-08-15 02:49:20 +01:00
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Escape special XML characters from `stdin`:
|
2021-08-15 02:49:20 +01:00
|
|
|
|
2023-06-14 16:32:31 +01:00
|
|
|
`echo "{{<a1>}}" | xml escape`
|
2021-08-15 02:49:20 +01:00
|
|
|
|
2021-08-16 13:23:55 +01:00
|
|
|
- Display help for the `escape` subcommand:
|
2021-08-14 23:17:52 +01:00
|
|
|
|
|
|
|
`xml escape --help`
|