How do you avoid name conflicts when you import data via XML?

If your website/web application is parsing information from multiple XML files, its easy for different XML files to use the same attribute name, this would cause name conflict errors if you try to combine both XML files together.

Here is an easy way to solve it, use a prefix to ensure there are no name conflict errors.

<a:table> <a:tr> <a:td>shirt</a:td> <a:td>shorts</a:td> </a:tr> </a:table> <b:table> <b:name>door</b:name> <b:width>80</b:width> <b:length>120</b:length> </b:table>

By adding this prefix, the XML is able to differentiate between both <table> values.