class XML {
protected $pointer;
public $degerler=array();
function loadString($string){
$this->pointer = simplexml_load_string($string);
return $this->pointer;
}
function loadFile($file){
$this->pointer = simplexml_load_file($file);
return $this->pointer;
}
function getname(){
return $this->pointer->getName();
}
function child(){
return $this->pointer->children();
}
function att(){
return $this->pointer->attributes();
}
function toArray(){
foreach ($this->child() as $sq){
$this->degerler[$this->getname()][$sq->getname()][][] = $sq; // How many key
}
return;
}
}
?>
(http://www.php.net/manual/en/function.simplexml-load-string.php#89430)
Không có nhận xét nào:
Đăng nhận xét