XML - File format a little help please

admin

Administrator
Staff member
Hi,

I have a list of company details in excel and I would like to create an .xml file with this information in I have had a go of it from what I have learnt from the w3school website.

Can you have a look what I have done and give me some feedback.


<? version="1.0" encoding="UT-8" ?>

<contacts>
<region code="000">
<business_unit>Head Office</business_unit>
<location>london</location>
<address>
<line1>Unit 52-53</line1>
<line2>Road</line2>
<line3>location</line3>
<line4>loation2</line4>
<line5/>
<postcode>cf115fr</postcode>
</address>
<region_nos>
<reception>01497 555555</reception>
<fax_no>01497 555555</fax_no>
</region_nos>
<itcs>
<itc1>
<name>John Do</name>
<tel>01497 555555</tel>
<mob>07777 999999</mob>
<email>[email protected]</email>
</itc1>
<itc2>
<name>John Do</name>
<tel>01497 555555</tel>
<mob>07777 999999</mob>
<email>[email protected]</email>
</itc2>
<itc3>
<name>John Do</name>
<tel>01497 555555</tel>
<mob>07777 999999</mob>
<email>[email protected]</email>
</itc3>
</region>
</contacts>


This file will have several region codes and I could not see any other way to get the region tag uniquie without using an attribute for the tag to indentify each region.

I was told it is better to try and leave attributes alone is there another way of doing it.

Thanks

Bach.
 
Back
Top