开发者

SimpleXml class 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜