1<?xml version="1.0" encoding="UTF-8"?> 2<root 3 xmlns:a="http://www.example.org/a" 4 xmlns:b="http://www.example.org/b" 5 xmlns:c="http://www.example.org/c" 6> 7 <p>Some text <b:i>with markup</b:i>.</p> 8 9 <g> 10 <a:p>More text</a:p> 11 <c:tag>Namespace 'c'</c:tag> 12 </g> 13 14 <!-- Use default NS (new: x is default) --> 15 <g1 xmlns="http://www.example.org/x"> 16 <p>This is in the namespace 'x' ('default')</p> 17 </g1> 18 19 <!-- Use another default NS (new: y is default1) --> 20 <g2 xmlns="http://www.example.org/y"> 21 <a:span>Namespace 'a' and parent uses <b>'y'</b> ('default1')</a:span> 22 </g2> 23 24 <!-- Swap namespaces prefixes --> 25 <g3 xmlns:a="http://www.example.org/c" xmlns:c="http://www.example.org/a"> 26 <a:pre>This is in the namespace 'c' even if the prefix tells 'a'</a:pre> 27 <c:div>and this is in the namespace 'a' even if the prefix tells 'c'</c:div> 28 <reset xmlns="">while this is back into the default namespace</reset> 29 </g3> 30 31 <!-- Reuse a NS as a default (new: a) --> 32 <g4 xmlns="http://www.example.org/a"> 33 <a:p>Default NS is 'a' and this node is too in 'a'</a:p> 34 </g4> 35 36</root> 37