Forrest logo
back to the xml tool

xml-unescape:tldr:58897

xml-unescape: Unescape special XML characters from a string.
$ xml unescape "${<a1>}"
try on your machine

The command xml unescape "${&lt;a1&gt;}" is used to unescape XML special entities in a string. In this particular example, the string being unescaped is ${&lt;a1&gt;}.

In XML, special characters like <, >, &, ", and ' have reserved meanings and cannot be used directly in a text. Instead, they need to be represented using special entities. In this case, the XML entity &lt; represents the < character.

So, the command xml unescape "${&lt;a1&gt;}" would unescape the XML special entity in the string ${&lt;a1&gt;}, replacing &lt; with <. The resulting unescaped string would be ${<a1>}.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the xml tool