- simplexml_load_string: documentation ( source)
<?php
$xml = '<OTA_VehAvailRateRS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" TimeStamp="2014-07-17T05:44:43" Target="Test" Version="4.500" SequenceNmbr="1">
<Success/>
<VehAvailRSCore>
<VehRentalCore PickUpDateTime="2014-07-18T07:00:00" ReturnDateTime="2014-07-19T07:00:00">
<PickUpLocation LocationCode="CAP"/>
<ReturnLocation LocationCode="CLT"/>
</VehRentalCore>
</VehAvailRSCore>
</OTA_VehAvailRateRS>
';
$xml = simplexml_load_string( $xml);
foreach( $xml->xpath( './/VehRentalCore') as $child) {
echo $child->attributes()['PickUpDateTime'] . "\n";
}