2021-08-16 08:23:55 -04:00
|
|
|
# xml escape
|
2021-08-14 18:17:52 -04:00
|
|
|
|
2021-08-23 21:26:03 -04:00
|
|
|
> Escape special XML characters, e.g. `<a1>` → `<a1>`.
|
2021-08-15 07:19:09 -04:00
|
|
|
> More information: <http://xmlstar.sourceforge.net/doc/xmlstarlet.pdf>.
|
2021-08-14 18:17:52 -04:00
|
|
|
|
2021-08-14 21:49:20 -04:00
|
|
|
- Escape special XML characters in a string:
|
|
|
|
|
2021-08-16 08:23:55 -04:00
|
|
|
`xml escape "{{<a1>}}"`
|
2021-08-14 21:49:20 -04:00
|
|
|
|
2021-08-20 21:33:37 -04:00
|
|
|
- Escape special XML characters from stdin:
|
2021-08-14 21:49:20 -04:00
|
|
|
|
2021-08-16 08:23:55 -04:00
|
|
|
`echo "{{<a1>}}" | xml escape`
|
2021-08-14 21:49:20 -04:00
|
|
|
|
2021-08-16 08:23:55 -04:00
|
|
|
- Display help for the `escape` subcommand:
|
2021-08-14 18:17:52 -04:00
|
|
|
|
|
|
|
`xml escape --help`
|