I am reading an XML to get the list of airport from IATA.
Below is the xml:
array ( 0 => SimpleXMLElement::__set_state(array( 'airport' => 'Aalborg, Denmark ', 'code' => 'AAL', )), 1 => SimpleXMLElement::__set_state(array( 'airport' => 'Aalesund, Norway ', 'code' => 'AES', )), 2 => SimpleXMLElement::__set_state(array( 'airport' => 'Aarhus, Denmark - Bus service ', 'code' => 'ZID', )))
I have tried:
$list = $xml->xpath("//airport");
display_output($list[0]);
I am getting:
SimpleXMLElement::__set_state(array( ))
How can I get?
Aalborg, Denmark