Share Posted October 25, 2011 I'm sure I'm missing something very obvious but can an appended XMLLoader detect any XML format errors? If my XML is well formed LoaderMax.getContent("XML") shows the XML. If I deliberately spoil my XML (leave off an end tag for example) LoaderMax.getContent("XML")=null. Also once the XML is corrupted the onComplete and onError which are attached to the XMLLoader aren't fired. I thought I might be able to get round it with an onRawLoad or onIOError event but these are also not fired. Is your XMLLoader detecting that the XML is corrupt and ignoring it? If this is the case can this 'ignoring' be listened for? Part of my loader needs to check that the XML is well formed and report any errors if it isn't. I wondered if there was a way to get an error if the XML is bad, end tags missing etc. my loader queue code: loadQueue = new LoaderMax({name:"mainLoad", onChildOpen:childOpenHandler, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); loadQueue.append(new SelfLoader(this, {name:"self"})); loadQueue.append(new XMLLoader(loadFile, {name:"XML",onComplete:completeXMLHandler, onError:errorXMLHandler})); loadQueue.load(); Cheers Matt Link to comment Share on other sites More sharing options...
Share Posted October 25, 2011 MacGuffin, In the case of malformed XML the onFail event will fire. event.text will show you the error that was thrown. Hope that helps. -Rob Link to comment Share on other sites More sharing options...
Author Share Posted October 25, 2011 Thanks Rob I knew there would be an event in there that did this. Thanks for taking the time to let me know. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now