XML error reference · XV019

Unterminated processing instruction

A processing instruction was opened with <? and never closed with ?>.

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 / xmllintParsePI: PI xml-stylesheet never end ...

What causes it

Processing instructions run from `<?target` to the first `?>`. Omitting the question mark on the closing delimiter, writing `>` instead of `?>`, is the usual mistake, and is easy to make on an `<?xml-stylesheet?>` line.

See it happen

Triggers the error
<?xml-stylesheet type="text/xsl" href="s.xsl">
<root/>
Corrected
<?xml-stylesheet type="text/xsl" href="s.xsl"?>
<root/>

How to fix it

Close the instruction with `?>`. The XML declaration is not technically a processing instruction, but it uses the same delimiters and the same rule applies.

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