XML parsing to put in an array with PHP

Job ID: 34251653

Budget: €8 – €30 EUR

I need to parse data contained in a list of XML files contained in a folder.
The XML structure is littlebit different between files but relevant data can be indexed with an ID (a timestamp) in the file so upi can use it as the key of array and avoid duplicates.

Simply data blocks like this:

<Start>2022/07/04 09:05:44</Start>
<Name>C:\Evol\Product\LSX\Bloccaggi.xmlst</Name>
<Program ID="20220704070548" L="2090.00" H="600.00" T="68.00" ListIndex="1">
<Start>2022/07/04 09:05:48</Start>
<Name>C:\EVOL\4 ANUBATELAIO PORTE FINESTRE.TCN</Name>
<End>2022/07/04 09:06:51</End>
</Program>
<End>2022/07/04 09:06:51</End>

Have to be saved in an array like this

$arra = array(
20220704070548 => array(
Start => '2022/07/04 09:05:48'
Name => 'C:\EVOL\4 ANUBATELAIO PORTE FINESTRE.TCN'
End => '2022/07/04 09:06:51'
),
202207040XXXXXX => array(
Start => '2022/07/04 0XXXXX'
Name => 'C:\EVOL\XXXXXX.TCN'
End => '2022/07/04 XXXXXX
),
....
)
Related categories: PHP XML Software Architecture