October 14, 2009

0 XML Advanced

XML Namespaces

XML Namespaces provide a method to avoid element name conflicts.

Name Conflicts

Since elment names in XML are not predefined, a name conflict will occur when two different documents use the same element names.

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 definiton.

0 comments:

Post a Comment

Blogger Themes

 
Powered by Blogger