jsonecho

Escapar XML

Convierte caracteres especiales en entidades XML seguras.

Cargando la herramienta...

Cómo usar Escapar XML

  1. Pega el texto.
  2. Copia el resultado escapado.

Sobre Escapar XML

En XML, ciertos caracteres tienen significado especial. Escaparlos evita que el documento deje de ser bien formado.

What gets escaped

& becomes &amp;, < becomes &lt;, > becomes &gt;, " becomes &quot; and ' becomes &apos;.

Preguntas frecuentes

Do I have to escape the greater-than sign?

In most places it is allowed unescaped, except in the sequence ]]>. Escaping it everywhere is the safe habit and is what this tool does.

What is the difference between XML and HTML escaping?

Only the apostrophe. XML defines ' for it, HTML does not. Everything else is the same.

Can I use CDATA instead?

For a long block of text, yes: <![CDATA[ ... ]]> lets you skip escaping. It is not available inside attribute values.

What about characters that are not allowed in XML at all?

Most control characters (apart from tab, line feed and carriage return) cannot appear in XML 1.0, even escaped. They have to be removed.

Más en Escape y texto

Todas las herramientas →