# Saving XML to file

**URL:** <https://forum.kirupa.com/t/saving-xml-to-file/22742>\
**Category:** programming\
**Created:** [June 7, 2003, 10:54pm UTC](https://forum.kirupa.com/t/saving-xml-to-file/22742 "2003-06-07T22:54:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roing](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@Roing](https://forum.kirupa.com/u/Roing)\
**Post date:** [June 7, 2003, 10:54pm UTC](https://forum.kirupa.com/t/saving-xml-to-file/22742/1 "2003-06-07T22:54:42Z")

</div>

Hi

I have a Flash movie that uase a XML file as database. Now I whant to edit the information… The editing in Flash is no problem but Flash can’t save to file…  
I need PHP for this.

The XML info is POSTed to the PHP file. Somehow the XML info sould the be put in to a XML file… I have a script that run on ASP that does this…

* * *

\<i\>

On Error Resume Next  
Dim fileName, fullPath

fileName=Request.Form(“fileName”)  
fullPath=Server.MapPath(fileName)

Dim xmlDoc, xmlData

xmlData=Request.Form(“xmlData”)  
set xmlDoc=CreateObject(“Msxml2.DOMDocument”)  
xmlDoc.async=False

xmlDoc.LoadXML(xmlData)  
xmlDoc.Save(fullPath)

dim taskStatus

if err then  
taskStatus="taskStatus=Error saving XML document as " & fileName  
else  
taksStatus="taskStatus=Saved XML document as " & fileName  
end if

## Response.Write taskStatus \</i\>

Could someone please help me?
