XML error reference · XV018

Literal ]]> in text content

The sequence ]]> appears in character data, where it is reserved.

What your parser calls it

The same problem, reported differently by each parser. If you arrived here from one of these strings, you are in the right place.

ParserMessage
libxml2 / xmllintSequence ']]>' not allowed in content

What causes it

`]]>` is the CDATA terminator and is forbidden in ordinary content, even when no CDATA section is open. It usually turns up in embedded code, or in text that was itself produced by concatenating XML fragments.

See it happen

Triggers the error
<code>array[i[j]]> 0</code>
Corrected
<code>array[i[j]]&gt; 0</code>

How to fix it

Escape the closing bracket as `]]&gt;`, or split the sequence across a CDATA boundary. This is one of the few places where escaping `>` is genuinely required rather than merely conventional.

Fix your own document

Paste your own document below. Press Sample if you want the broken example above loaded instead. Nothing you paste leaves this tab.

XML Validator

Well-formedness and schema validation. Nothing is uploaded.

Input
WaitingPaste a document to check it. Validation runs as you type.

Everything runs in this tab. Nothing you paste is uploaded, logged or sent anywhere. Open your network panel and check.

Tools that catch this

Background reading

Errors this fixes

Every XML error, explained