22 chars · 1 line
Waiting for input
22 chars · 1 line
Waiting for input
XML namespace troubleshooting
The sample uses x:item without declaring what x means. A namespace prefix is not just decoration in the tag name; it must be bound with an xmlns:x declaration that is in scope for the prefixed element or attribute. This tool is free to use. No account or payment is required.
Last updated
The same short prefix can represent different namespace URIs in different documents. XML therefore requires an explicit binding instead of assuming a globally known meaning for x, soap, xsi, or other prefixes.
A declaration on the root element applies to descendants unless overridden. A declaration on a nested element has narrower scope and will not fix prefixed names that appear earlier or outside that subtree.
Bind x to a namespace URI before using x:item.
<root><x:item/></root><root xmlns:x="urn:example"><x:item/></root>Common questions
It binds the prefix x to a namespace URI for the declaration's scope.
Usually the prefix text is a local shorthand, but the namespace URI must match what the consuming format expects.
No. A default namespace applies to unprefixed element names; prefixed names need their own prefix binding.
Debugging a specific XML issue? Browse XML troubleshooting.