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.
| Parser | Message |
|---|---|
| libxml2 / xmllint | AttValue: " or ' expected |
| Firefox DOMParser | XML Parsing Error: unexpected parser state |
| Java SAXParser | Open 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
<image width=100 height=200/><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 `"` 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.
Everything runs in this tab. Nothing you paste is uploaded, logged or sent anywhere. Open your network panel and check.