Hi all i got a php script that pulls xml file from remote server and writes it to a file and also displays it browser.The porblem is that the echo does not produced well formated xml!!(Note:the writeen file is well formated but not output to browser). when i call this php i want to be able to use its content but since it is not formated i can not use it. I be happy if some one show me how i can output well formated xml .Thanks
<?php
$xml_data = file_get_contents("
echo $xml_data;
$file = fopen("./myfile.xml", "w");
fwrite($file, $xml_data);
fclose($file);
?>
<?php
$xml_data = file_get_contents("
echo $xml_data;
$file = fopen("./myfile.xml", "w");
fwrite($file, $xml_data);
fclose($file);
?>