开发者

SimpleXml class not found

开发者 https://www.devze.com 2022-12-26 16:03 出处:网络
After initiating a new SimpleXml object: $xml = new SimpleXML($xmlStr); PHP errors out: Fatal error: Class \'SimpleXML\' not found

After initiating a new SimpleXml object:

$xml = new SimpleXML($xmlStr);

PHP errors out:

Fatal error: Class 'SimpleXML' not found

PHP info reads:

  • Simplexml support enab开发者_JAVA百科led
  • Revision $Revision: 1.151.2.22.2.35.2.32 $
  • Schema support enabled

What could possibly be going wrong?


try SimpleXMLElement


To parse XML, use:

simplexml_load_string($string);

Or:

simplexml_load_file($filename);

These will each return SimpleXMLElement objects, as noted by others.

0

精彩评论

暂无评论...
验证码 换一张
取 消