--------------------------------------------------------------------------------
XML Namespaces provide a method to avoid element name conflicts.
--------------------------------------------------------------------------------
Name Conflicts
Since element names in XML are not fixed, very often a name conflict will occur when two different documents use the same names describing two different types of elements.
This XML document carries information in a table:
<table>
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</table>
This XML document carries information about a table (a piece of furniture):
<table>
<name>African Coffee Table</name>
<width>80</width>
<length>120</length>
</table>
If these two XML documents were added together, there would be an element name conflict because both documents contain a <table> element with different content and definition.
--------------------------------------------------------------------------------
Solving Name Conflicts using a Prefix
This XML document carries information in a table:
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
This XML document carries information about a piece of furniture:
<f:table>
<f:name>African Coffee Table</f:name>