Beware malformed XML!


it seems flex swallows exceptions when try load malformed or invalid xml document follows. had document forgot close tags @ end , despite spending day in debugger stepping thru code never threw exception , unable catch try-catch. behavior saw load function below execute event handler onload below never fire.

public static function load():void{
var url:string = " http://someurl/malformed.xml";
var service:httpservice = new httpservice();
service.resultformat = "e4x";
service.url = url;
service.addeventlistener(resultevent.result, onload);
service.send();
}

private static function onload(event:resultevent):void{
var myxml:xmllistcollection = new xmllistcollection(event.result.*);
}

yeah, flex pretty adamant "legal" xml structure. have experimented same thing. outputting data mysql via php proxy flex. didn't succeed many times, once realized mismatched tag cause onload event fail, started run xml through validator before sending out proxy bridge.


More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums