Hi I'm parsing xml response from server using SwiftyXMLParser. I'm can successfully parse single xml but have problem with array value. always got nil
here is my sample xml
<ItemTrackingDetailsResponse xmlns="http://singpost.com/paw/ns" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ItemsTrackingDetailList>
<ItemTrackingDetail>
<TrackingNumber>SMT0000000628</TrackingNumber>
<TrackingNumberFound>true</TrackingNumberFound>
<AlternativeTrackingNumber/>
<TrackingNumberActive>true</TrackingNumberActive>
<PostingDate/>
<InsuredValue/>
<InsuredSDR/>
<Weight/>
<ExpressInd/>
<ItemCategory/>
<Content/>
<PreadviceDate/>
<ReceptacleID/>
<OriginalCountry>Singapore</OriginalCountry>
<DestinationCountry>Singapore</DestinationCountry>
<ItemType>Speedpost</ItemType>
<DeliveryStatusDetails>
<DeliveryStatusDetail>
<StatusDescription>Recovered item from POPStation for service recovery</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-22T16:35:30</Date>
<AceDate>20160822 163530</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>Delivered to POPStation</StatusDescription>
<Location>POPStation@Yew Tee Square</Location>
<BeatNo/>
<Date>2016-08-16T17:27:48</Date>
<AceDate>20160816 172748</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>With Delivery Courier</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-16T11:25:00</Date>
<AceDate>20160816 112500</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>Received at Processing Facility</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-16T10:28:07</Date>
<AceDate>20160816 102807</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>Notification of shipment confirmation</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-13T11:10:29</Date>
<AceDate>20160813 111029</AceDate>
</DeliveryStatusDetail>
</DeliveryStatusDetails>
</ItemTrackingDetail>
</ItemsTrackingDetailList>
<Status>
<ErrorCode>0</ErrorCode>
<ErrorDesc>Success</ErrorDesc>
</Status>
</ItemTrackingDetailsResponse>
I can get single item by
print(xml!["ItemTrackingDetailsResponse","ItemsTrackingDetailList","ItemTrackingDetail","ItemType"].text)
but for the array I can not get the detail. How to access array member? Any help is much appreciate. Thanks
<DeliveryStatusDetails>
<DeliveryStatusDetail>
<StatusDescription>Recovered item from POPStation for service recovery</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-22T16:35:30</Date>
<AceDate>20160822 163530</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>Delivered to POPStation</StatusDescription>
<Location>POPStation@Yew Tee Square</Location>
<BeatNo/>
<Date>2016-08-16T17:27:48</Date>
<AceDate>20160816 172748</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>With Delivery Courier</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-16T11:25:00</Date>
<AceDate>20160816 112500</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>Received at Processing Facility</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-16T10:28:07</Date>
<AceDate>20160816 102807</AceDate>
</DeliveryStatusDetail>
<DeliveryStatusDetail>
<StatusDescription>Notification of shipment confirmation</StatusDescription>
<Location>SPEEDPOST SERVICE CENTRE</Location>
<BeatNo/>
<Date>2016-08-13T11:10:29</Date>
<AceDate>20160813 111029</AceDate>
</DeliveryStatusDetail>
</DeliveryStatusDetails>