27 chars · 1 line
Waiting for input
27 chars · 1 line
Waiting for input
XML character-data syntax
The sample places ]]> directly in element text even though no CDATA section is open. XML reserves that sequence for closing CDATA, so normal character data must avoid the exact three-character marker. This tool is free to use. No account or payment is required.
Last updated
The XML grammar forbids ]]> in normal character data so the parser never has to reinterpret an accidental terminator. Encoding one character keeps the rendered text equivalent without using the reserved literal sequence.
Encode the greater-than sign so the literal ]]> sequence no longer appears.
<root>value ]]> more</root><root>value ]]> more</root>Common questions
No. The literal sequence is forbidden in ordinary character data.
Yes. Encoding the greater-than sign breaks the reserved literal sequence while preserving the text value.
No. This case has no open CDATA section; the reserved closing marker appears in normal text.
Debugging a specific XML issue? Browse XML troubleshooting.