Thank you again to Jorge for his suggestions and getting me on the right path.
I am posting here how I finally accomplished what I wanted to do.
As recommended by Jorge, I started here (http://www.php.net/manual/en/ref.domxml.php
Then jumped to here (http://www.php.net/manual/en/function.domxml-open-mem.php
). I had been attempting this method/function previously, but didn't get why it wasn't working for me. Farther down on this last link though, there was a post stating, ...
"Although undocumented, domxml_open_mem does not exist in PHP5. See this site for a quick fix:http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/index.en.html
...so, went to the quoted link, got a class that made up for this method not being in my version of PHP, and my resulting, final, working code is posted below.
I am posting here 1 AS3 function, and 1 PHP function. In my AS3 code, I'm using the Cairngorm Service to Worker Pattern, so there's obviously a good bit of code I'm not posting here. I'm just laying out here the two key functions that are related to my initial question.
Again, to be clear, my purpose was to create the XML in AS3, and use PHP to save the XML file to the server. I haven't much experience at all with PHP, so if someone has thoughts on a better way to accomplish this, please feel free to post. I'm always open to learn.
public function delegateAction():void
var xml:XML =
<page label="Home" isPage="true" urlName="home" showOnMenu="true" title="Home">
<xmlPath dl="" tag=""></xmlPath>
<bmpPath dl="" tag=""></bmpPath>
<swfPath dl="" tag=""></swfPath>
var call:Object = this.service.SaveXMLFile( xml.toXMLString() );
call.addResponder( this.responder );
public function SaveXMLFile($incomingXml)
$topHeader = '<?xml version="1.0" encoding="ISO-8859-1"?>';
$incomingXml = $topHeader . $incomingXml;
$xmlDoc = domxml_open_mem($incomingXml);
$result = $xmlDoc->dump_file("myFile.xml");
if($result == false)