Create PHP DOM xml file and create a save file link/prompt without writing the file to the server wh

Posted by Reed Richards on Stack Overflow See other posts from Stack Overflow or by Reed Richards
Published on 2008-10-14T18:37:58Z Indexed on 2010/06/01 5:43 UTC
Read the original article Hit count: 330

Filed under:
|
|
|

I've created a PHP DOM xml piece and saved it to a string like this:

<?php
  // create a new XML document 
  $doc = new DomDocument('1.0');
  ...  
  ...
  ...
  $xmldata = $doc->saveXML();
?>

Now I can't use the headers to send a file download prompt and I can't write the file to the server, or rather I don't want the file laying around on it.

Something like a save this file link or a download prompt would be good. How do I do it?

© Stack Overflow or respective owner

Related posts about php

Related posts about Xml