- Namespace prefixes can be placed on element and attribute names, with
a colon separating the two parts.
- The xmlns prefix binds namespace prefixes to namespace URIs.
- Local name: The non-prefixed part of a name
- Qualified name: A complete name consisting of the combination of a
local name and its prefix
- Default namespace: bounded to an empty prefix
- Empty URIs represent undeclared namespaces; can be used only for
default namespaces
- Non-prefixed element names belong to the default namespace
- Non-prefixed attribute names
- Belong to the namespace of their element, if the element is not from
a default namespace
- Belong to an undeclared namespace, if their element is from a default
namespace.
<?xml version="1.0" encoding="UTF-8"?>
<or:oranges xmlns:or="fruit://osu/or"
xmlns:ap="fruit://osu/ap"
xmlns ="fruit://osu/ot"
at="1">
<ap:apples at="2" >...</ap:apples>
<other or:at="3" at="4" >...</other>
<none xmlns="" >...</none>
</or:oranges>
The element other comes from the default namespace
The element none doesn’t belong to a namespace
The attribute at="2" belongs to fruit://osu/ap
The attribute at="4" belongs to no namespace