$Xml_Value){ $Index = count($NowObj); if($Xml_Value["type"] == "complete"){ $NowObj[$Index] = new Xml; $NowObj[$Index]->tag = array_key_exists($TG,$Xml_Value)?$Xml_Value[$TG]:""; $NowObj[$Index]->value = array_key_exists($VL,$Xml_Value)?$Xml_Value[$VL]:""; $NowObj[$Index]->attributes = array_key_exists($AT,$Xml_Value)?$Xml_Value[$AT]:""; }elseif($Xml_Value["type"] == "open"){ $NowObj[$Index] = new Xml; $NowObj[$Index]->tag = array_key_exists($TG,$Xml_Value)?$Xml_Value[$TG]:""; $NowObj[$Index]->value = array_key_exists($VL,$Xml_Value)?$Xml_Value[$VL]:""; $NowObj[$Index]->attributes = array_key_exists($AT,$Xml_Value)?$Xml_Value[$AT]:""; $NowObj[$Index]->next = array(); $LastObj[count($LastObj)] = &$NowObj; $NowObj = &$NowObj[$Index]->next; }elseif($Xml_Value["type"] == "close"){ $NowObj = &$LastObj[count($LastObj) - 1]; unset($LastObj[count($LastObj) - 1]); } } return $XmlClass; } }