这篇文章主要为大家详细介绍了php 使用Codeigniter 通过 SimpleXML将xml转换成对象示例,具有一定的参考价值,可以用来参考一下。
对php Codeigniter 通过 SimpleXML将xml转换成对象感兴趣的小伙伴,下面一起跟随四海网的小编两巴掌来看看吧!
/**
* php Codeigniter 通过 SimpleXML将xml转换成对象
*
* @param
* @arrange 512-笔记网: www.q1010.com
**/
class CI_ManipulateXML
{
var $xml='';
function CI_ManipulateXML($xmlcontent)
{
$this->xml=$xmlcontent;
}
function ConvertXML() {
try {
$xmlobject = new SimpleXMLElement($this->xml);
if ($xmlobject == false) {
return false;
}
}
catch (Exception $e) {
return false;
}
return $xmlobject;
}
}
/*** 来自四海网(www.q1010.com) ***/
本文来自:http://www.q1010.com/173/954-0.html
注:关于php 使用Codeigniter 通过 SimpleXML将xml转换成对象示例的内容就先介绍到这里,更多相关文章的可以留意四海网的其他信息。
关键词:Codeigniter
四海网收集整理一些常用的php代码,JS代码,数据库mysql等技术文章。