Correct way of creating this XML

wxdqz

New Member
Hi

I'm going to create a little XML doc/string which external people are going to read and I'm wondering how I should structure it correctly. The XML is going to contain a list of customers and their collection of "keys". I was thinking something like this:

<CUSTOMERDATA>
<NAME>Elvis</NAME>
<KEY>
<OLDKEY>BLEPPBLUPP</OLDKEY>
<NEWKEY>KLABBBABB</NEWKEY>
</KEY>
<KEY>
<OLDKEY>NUNUNUNUNU</OLDKEY>
<NEWKEY>YEYEYEYE</NEWKEY>
</KEY>
</CUSTOMEDATA>
<CUSTOMERDATA>
<NAME>Presley</NAME>
<KEY>
<OLDKEY>KBABABABA</OLDKEY>
<NEWKEY>LEPEPEPE</NEWKEY>
</KEY>
<KEY>
<OLDKEY>LKJDLDJK</OLDKEY>
<NEWKEY>OIFUOFUOIF</NEWKEY>
</KEY>
</CUSTOMEDATA>

To make this correct XML, should I number the keys, like <KEY1>, <KEY2> etc? Should the CUSTOMERDATA also be numbered then?

Thanks
Lubox
 
Back
Top