Jump to content
Search Community

validation of loaded xml

macguffin test
Moderator Tag

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...