0

I want to get value from file type *.xml. I have problem, because file is type *.php.

File name.php for example has value:

<?xml version="1.0" encoding="UTF-8"?>
<pairs>
    <pair>
        <name>EURUSD</name>
        <bid>1.11947</bid>
        <ask>1.11967</ask>
    </pair>
</pairs>

I don't know how deserialize this file.

I use: $xml = simplexml_load_file('https://page_with_file/file.php');

I have message: Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in

Hast
  • 9,416
  • 6
  • 45
  • 68
ABC
  • 35
  • 1
  • 7

0 Answers0