About the XML Escape/Unescape
XML defines exactly five predefined entities: & (&), < (<), > (>), " (") and ' ('). Unlike HTML there is no or © unless a DTD declares it — a common cause of “undefined entity” parse errors when HTML snippets are pasted into XML, RSS or SVG.
In element text only & and < must be escaped (and > in the sequence ]]>); this tool always escapes all three. Inside attribute values the quote that delimits the value must also be escaped, which is what “Escape quotes” does. Tick “Non-ASCII as &#xNN;” when the document must be pure ASCII or its encoding is uncertain.
Unescaping converts the five entities and decimal or hex character references such as © and é. Any other named entity is left untouched and counted in the status line, because only the document's DTD could define it. Invalid code points such as � are reported as errors.
How to use it
- Choose Escape or Unescape.
- Keep “Escape quotes” on if the text goes into an attribute value.
- Paste the text.
- Copy the escaped or unescaped output.