Why XML uses namespaces
XML namespaces let one document safely mix vocabularies — an SVG image inside XHTML, Dublin Core metadata inside an Atom feed, or a SOAP security header inside a SOAP envelope — without element name collisions. The mechanism is simple: every vocabulary is identified by a globally unique URI, bound locally to a short prefix. This searchable reference lists the URIs for the standards you encounter most often, with their conventional prefixes and a copy button so you never mistype a character.
How namespace declarations work
A namespace is declared with an xmlns attribute that binds a prefix to a URI:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Body>
<price xsd:type="xsd:decimal">9.99</price>
</env:Body>
</env:Envelope>
The prefix (env, xsd) is purely a local alias valid within the scope of the element where it is declared. The URI is the only thing that matters for identity — processors compare URIs by exact string equality. This means env:Body and soap:Body refer to the same thing when both env and soap map to http://www.w3.org/2003/05/soap-envelope, and a missing trailing slash makes a different namespace entirely.
A default namespace (xmlns="...") applies to the declaring element and all its unprefixed descendants, which is common in XHTML and SVG documents where every element belongs to the same vocabulary.
The namespaces you will meet most often
| Prefix | Namespace URI | Standard |
|---|---|---|
soap (v1.1) | http://schemas.xmlsoap.org/soap/envelope/ | SOAP 1.1 |
env (v1.2) | http://www.w3.org/2003/05/soap-envelope | SOAP 1.2 |
xsd / xs | http://www.w3.org/2001/XMLSchema | XML Schema Definition |
xsi | http://www.w3.org/2001/XMLSchema-instance | XML Schema Instance |
svg | http://www.w3.org/2000/svg | SVG |
xhtml | http://www.w3.org/1999/xhtml | XHTML |
dc | http://purl.org/dc/elements/1.1/ | Dublin Core |
atom | http://www.w3.org/2005/Atom | Atom feeds |
rss | (no standard prefix; RSS 2.0 has no namespace) | RSS 2.0 |
xml | http://www.w3.org/XML/1998/namespace | XML itself (always pre-bound) |
The xml prefix is special: it is permanently pre-bound by the XML specification and cannot be re-declared. You use it for built-in attributes like xml:lang and xml:space.
Common mistakes and how to avoid them
Mismatched SOAP versions. SOAP 1.1 and 1.2 use different envelope namespaces. A server that expects SOAP 1.2 will reject a message using the SOAP 1.1 namespace with a version mismatch fault. Always confirm which version an endpoint expects before choosing the namespace.
Trailing slash. http://www.w3.org/2000/svg and http://www.w3.org/2000/svg/ are distinct identifiers. SVG uses the version without the trailing slash. Copy it; do not retype it.
Retyping the URI. Namespace URIs are long enough that subtle typos (a transposed digit, a different capitalisation) create a namespace that no processor recognises. Always use the copy button in this reference.
Scope confusion. A namespace declaration on an element scopes to that element and its descendants. Declaring xmlns:xsd on the root element makes it available everywhere; declaring it on a child element limits its scope. Most documents declare all namespaces at the root for clarity.
Practical tip — validate namespace declarations
After writing or generating XML that uses multiple namespaces, paste it into an XML schema validator (xmllint, Oxygen, or your IDE’s built-in XML tools) to confirm that every prefix is declared and every URI is the exact expected string. A mis-declared namespace is a frequent source of SOAP client errors and malformed feed parsers that are hard to diagnose without tooling.
All filtering in this reference happens in your browser with a bundled namespace list — nothing is uploaded or queried from a server.