Printing the xml from a file_get_contents
is possible with a simple echo
$file = file_get_contents('http://example.com/rss');
echo $file;
There are two more ways:
print ($file);
or using the asXML method:
$xml->asXML('filename.xml');
To work with asXML you must have a SimpleXMLElement object that can be seen in this decoupling: Link
OBS: If you have xdebug installed it will truncate the result of var_dump
to prevent browser crashes, this is the information link Link
There are a number of settings that control the output of Xdebug's
modified var_dump () function: xdebug.var_display_max_children,
xdebug.var_display_max_data and xdebug.var_display_max_depth.