This content has been marked as final. Show 4 replies
Found the answer.
The problem is Mozilla Firefox.
Looks like It closes the servlet's output stream (the Flex input stream) before the XML is completly downloaded by my Flex application.
It works fine on Internet Explorer.
Hope the Flex guys fix this!
I've had the same problem with Firefox, unfortunately I think it's something we'll have to live with since it's a bug in Firefox and out of Adobe's control.
Looks like is a Flash problem, because the same error happen on the standalone Flash Player :/
Anybody knows why?
You must, manually correct the XML returned from the server with this function:
public static function parseXML(event: ResultEvent, parentTag: String): XML
var xml: String = event.result.toString();
var endTagIndex: int = xml.indexOf("</" + parentTag + ">");
var endTagLength: int = new String("</" + parentTag + ">").length;
xml = xml.substring(0, endTagIndex + endTagLength);
return new XML(xml);