well what i wnat to do is create a xml file and download it, if it is possible not saving in the server.
what i have so far is creating the xml with DOMDocument and store it in the server
<?php
$domTree = new DOMDocument('1.0', 'UTF-8');
$rootXML = $domTree->createElement( 'XML' );
$rootXML = $domTree->appendChild($rootXML);
$personalData = $domTree->createElement( 'PERSONAL' );
$personalData = $rootXML->appendChild($personalData);
$personalData ->nodeValue = "Alan";
$domTree->save('MyXmlFile.xml');
?>
i know i supposed to use something like this
<?php
header('Content-type: text/xml');
header('Content-Disposition: attachment; filename="text.xml"');
echo $xml_contents;
?>
but using DOMDocument im lost in hwo using it, THANKS IN ADVANCE!