graeme_deacon
04-14-2006, 12:40 AM
So I have a very simple php page called nums.php that outputs some xml.
<?php
echo '<root>Hello</root>';
?>
can't get any simpler than that!
Now I have a flash movie with a submit button (instance name: submit_tickets) and an input text box (instance name: ticket_input) that I'm just using to output the result into for now. I have the following actionscript attached to the button.
on(release){
var content_xml:XML = new XML();
content_xml.onLoad = function(success){
if(success)
{
ticket_input.text = content_xml.toString();
trace(content_xml.status);
}
else
{
trace("failure");
}
}
content_xml.load("nums.php");
}
When I publish this movie and click the button I get a trace output of -6. According to macromedia this means "-6 An XML element was malformed." However when I just publish the same xml in a plain-text "nums.xml" document it works fine and has a return code of 0.
I've already tried putting <?xml version="1.0" ?> in front of the xml to no avail. I also turned on the output buffering in php.ini just to see of that was the problem.
Any help is greatly appreciated.
<?php
echo '<root>Hello</root>';
?>
can't get any simpler than that!
Now I have a flash movie with a submit button (instance name: submit_tickets) and an input text box (instance name: ticket_input) that I'm just using to output the result into for now. I have the following actionscript attached to the button.
on(release){
var content_xml:XML = new XML();
content_xml.onLoad = function(success){
if(success)
{
ticket_input.text = content_xml.toString();
trace(content_xml.status);
}
else
{
trace("failure");
}
}
content_xml.load("nums.php");
}
When I publish this movie and click the button I get a trace output of -6. According to macromedia this means "-6 An XML element was malformed." However when I just publish the same xml in a plain-text "nums.xml" document it works fine and has a return code of 0.
I've already tried putting <?xml version="1.0" ?> in front of the xml to no avail. I also turned on the output buffering in php.ini just to see of that was the problem.
Any help is greatly appreciated.