XML error reference · XV027
Reserved xml prefix misuse
The reserved xml or xmlns prefix is bound to the wrong namespace URI.
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 | xml namespace prefix mapped to wrong URI |
| .NET XmlException | Prefix 'xml' is reserved for use by XML. |
What causes it
The `xml` prefix is permanently bound to `http://www.w3.org/XML/1998/namespace` and may not be bound to anything else. The `xmlns` prefix is bound to `http://www.w3.org/2000/xmlns/` and may not be redeclared at all. Names beginning with the letters "xml" in any case are also reserved for future specification use.
See it happen
<doc xmlns:xml="http://example.com/ns"/><doc xml:lang="en"/>How to fix it
Use `xml:lang`, `xml:space`, `xml:base` and `xml:id` without declaring anything, since the binding is implicit. For your own vocabulary, choose a prefix that does not start with "xml".
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.