I NEED MINE. In stores March 27th
Make your own Lil Flip ringtone!
hometourvideosget updates
latest news
xml_data=array(); $this->parents=array(); $this->parent_ids=array(); $this->count=array(); $this->error=array(); } // Destructor function destruct(){ xml_parser_free( $this->xp ); } // return array of xml data function getData(){ return $this->xml_data; } // return 1 for an error, 0 for no error function isError(){ if( sizeof( $this->error ) >0 ){ return 1; } else{ return 0; } } // return array of error messages function getError(){ return $this->error; } // process xml start tag function startElement( $xp, $name, $atts ){ if( isset( $this->count[$name] ) ){ $this->count[$name]++; } else{ $this->count[$name]=0; } $temp=$this->parents; $temp=array_pop( $temp ); $this->xml_data[$name][$this->count[$name]]['atts']=$atts; $this->xml_data[$name][$this->count[$name]]['parent_name']=$temp; $this->xml_data[$name][$this->count[$name]]['parent_id']=$this->count[$temp]; array_push( $this->parents, $name ); array_push( $this->parent_ids, $this->count[$name] ); } // process xml end tag function endElement( $xp, $name ){ array_pop( $this->parents ); array_pop( $this->parent_ids ); } // process data between xml tags function dataHandler( $xp, $data ){ $last=$this->parents[sizeof( $this->parents ) -1]; $this->xml_data[$last][$this->count[$last]]['data'].=$data; } // parse xml document $xml_file function parse( $xml_file ){ if( !( $this->xp=@xml_parser_create() ) ){ $this->error['description']='Could not create xml parser'; } if( !( $this->isError() ) ){ if( !( @xml_set_object( $this->xp, &$this ) ) ){ $this->error['description']='Could not set xml parser for object'; } } if( !( $this->isError() ) ){ if( !( @xml_set_element_handler( $this->xp, 'startElement', 'endElement' ) ) ){ $this->error['description']='Could not set xml element handler'; } } if( !( $this->isError() ) ){ if( !( @xml_set_character_data_handler( $this->xp, 'dataHandler' ) ) ){ $this->error['description']='Could not set xml character handler'; } } if( !( $this->isError() ) ){ if( !( $fp=@fopen( $xml_file, 'r' ) ) ){ $this->error['description']='Could not open xml document'; } } if( !( $this->isError() ) ){ while( $data=fread( $fp, 4096 ) ){ if( !( @xml_parse( $this->xp, $data, feof( $fp ) ) ) ){ $this->error['description']=xml_error_string( xml_get_error_code( $this->xp ) ); $this->error['line']=xml_get_current_line_number( $this->xp ); } } } } } ?>