SimpleXMLElement file does not load xmlString

前端 未结 1 639
无人及你
无人及你 2021-01-26 04:58

I am trying to work on an XML Based problem. So far, it\'s proving to be a bummer for some reason. My code is only two lines and for some reason nothing is loading in.

T

相关标签:
1条回答
  • 2021-01-26 05:14

    Your XML is probably invalid. Look at the fine PHP manual that describes how to handle those errors:

    http://php.net/manual/en/simplexml.examples-errors.php

    You can also validate your XML with command line tools like xmllint:

    $ xmllint --noout /path/to/file.xml
    file.xml:1: parser error : XML declaration allowed only at the start of the document
    
    0 讨论(0)
提交回复
热议问题