"; if($FontSize){ print ""; } $xml=str_replace("<","<",$xml); //print_r($Results); print $xml; if($FontSize){ print ""; } print ""; exit(); }else{ if($aurow[NewLineSubstitutionString]){ $vars[XMLNewLineSubstitutionString]=$aurow[NewLineSubstitutionString]; } foreach($Results[EventCategories][0][EventCategory] as $EventCategory){ print "
"; print_r($EventCategory); print ""; } } function http_get($URL){ $URL=str_replace("\"","%34",$URL); $URL=str_replace("\n","",$URL); return `/usr/bin/lynx -source "$URL"`; } function xml2array( $textXml ) { $regExElements = '/<(\w+)([^>]*)>(.*?)<\/\\1>/s'; $regExAttributes = '/(\w+)="([^"]*)"/'; preg_match_all( $regExElements, $textXml, $matchElements ); foreach ( $matchElements[1] as $keyElements=>$valElements ) { if ( $matchElements[2][$keyElements] ) { preg_match_all( $regExAttributes, $matchElements[2][$keyElements], $matchAttributes ); foreach ( $matchAttributes[0] as $keyAttributes=>$valAttributes ) { $arrayAttributes[ $valElements.' attributes' ][$matchAttributes[1][ $keyAttributes ] ] = $matchAttributes[2][ $keyAttributes ]; } } else { $arrayAttributes = null; } if ( preg_match( $regExElements, $matchElements[3][$keyElements]) ) { if ( $arrayAttributes ) { $arrayFinal[ $valElements ][ $valElements.' attributes' ] = $arrayAttributes[ $valElements.' attributes' ]; } $arrayFinal[ $valElements ][] = xml2array( $matchElements[3][$keyElements] ); } else { $arrayFinal[ $valElements ] = $matchElements[3][ $keyElements ]; $arrayFinal = array_merge( $arrayFinal, $arrayAttributes ); } } return $arrayFinal; } ?>