Hi everyone, I’ve got a question about importing data from xml into an array so I can display the information. I have the following xml which I don’t mind changing but the problem is:
I need to display the name of the email and job number per week for every month. The way I have it is that I’ve been recording the name and job number in two separate arrays. However the number of emails can vary from one week to the next (in the xml there is two in week one etc) but also there are weeks where there are no emails.
I don’t want to name the tags in xml week1 etc but the using my method is that all the emails go into the arrays easily, but I can’t tell from the array how many are for which week. Does any of that make sense?
<emails>
<week>
<vendor>Microsoft</vendor>
<jobNumber>05234</jobNumber>
<vendor>Plantronics</vendor>
<jobNumber>05452</jobNumber>
</week>
<week>
<vendor>Adobe</vendor>
<jobNumber>05265</jobNumber>
</week>
<week>
<vendor>Autodesk</vendor>
<jobNumber>05365</jobNumber>
</week>
</emails>
Is there a way of recording that the first instance of <week> has two and the others whatever they may be?
Any ideas would be great appreciated, thank you.