XML error reference · XV010

Unquoted attribute value

An attribute value is missing its surrounding quotes.

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 / xmllintAttValue: " or ' expected
Firefox DOMParserXML Parsing Error: unexpected parser state
Java SAXParserOpen quote is expected for attribute "width" associated with an element type "image".

What causes it

Every XML attribute value must be wrapped in single or double quotes, with no exceptions. HTML tolerates `width=100`; XML does not. Hand-written XML and templates ported from HTML are where this usually shows up.

See it happen

Triggers the error
<image width=100 height=200/>
Corrected
<image width="100" height="200"/>

How to fix it

Quote the value. Use double quotes by convention, switching to single quotes when the value itself contains a double quote. Alternatively escape the inner quote as `&quot;` and keep double quotes throughout.

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