[PHP] Codeigniter 通过 SimpleXML将xml转换成对象 →→→→→进入此内容的聊天室

来自 , 2020-08-17, 写在 PHP, 查看 108 次.
URL http://www.code666.cn/view/45c166d6
  1. class CI_ManipulateXML
  2. {
  3.  
  4. var $xml='';
  5.  
  6. function CI_ManipulateXML($xmlcontent)
  7. {
  8.     $this->xml=$xmlcontent;
  9. }
  10.  
  11. function ConvertXML() {
  12.  
  13. try {
  14.     $xmlobject = new SimpleXMLElement($this->xml);
  15.     if ($xmlobject == false) {
  16.         return false;
  17.     }
  18. }
  19. catch (Exception $e) {
  20.     return false;
  21.     }
  22. return $xmlobject;
  23. }
  24. }
  25.  
  26.  

回复 " Codeigniter 通过 SimpleXML将xml转换成对象"

这儿你可以回复上面这条便签

captcha