XML2array example

'cdtitle'   =>'album',
                    );
                    foreach ($tagmapping as $fromkey => $tokey) {
                        if (isset($thisfile_riff_WAVE_SNDM_0['parsed'][$fromkey])) {
                            $thisfile_riff['comments'][$tokey][] = $thisfile_riff_WAVE_SNDM_0['parsed'][$fromkey];
                        }
                    }
                }

                if (isset($thisfile_riff_WAVE['iXML'][0]['data'])) {
                    // requires functions simplexml_load_string and get_object_vars                     if ($parsedXML = getid3_lib::XML2array($thisfile_riff_WAVE['iXML'][0]['data'])) {
                        $thisfile_riff_WAVE['iXML'][0]['parsed'] = $parsedXML;
                        if (isset($parsedXML['SPEED']['MASTER_SPEED'])) {
                            @list($numerator$denominator) = explode('/', $parsedXML['SPEED']['MASTER_SPEED']);
                            $thisfile_riff_WAVE['iXML'][0]['master_speed'] = $numerator / ($denominator ? $denominator : 1000);
                        }
                        if (isset($parsedXML['SPEED']['TIMECODE_RATE'])) {
                            @list($numerator$denominator) = explode('/', $parsedXML['SPEED']['TIMECODE_RATE']);
                            $thisfile_riff_WAVE['iXML'][0]['timecode_rate'] = $numerator / ($denominator ? $denominator : 1000);
                        }
                        if (isset($parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO']) && !empty($parsedXML['SPEED']['TIMESTAMP_SAMPLE_RATE']) && !empty($thisfile_riff_WAVE['iXML'][0]['timecode_rate'])) {
                            $samples_since_midnight = floatval(ltrim($parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI'].$parsedXML['SPEED']['TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO'], '0'));
                            
Home | Imprint | This part of the site doesn't use cookies.