RE: [Flashcoders] Error check for parseXML()

2006-10-09 Thread Mike Keesey
: [Flashcoders] Error check for parseXML() Hi, you should put the conditional in a callback, because when execution reaches the conditional xml parsing might not have finished parsing. var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(someTextVar); xml.onLoad = function(success:Boolean

Re: [Flashcoders] Error check for parseXML()

2006-10-07 Thread Ray Chuan
Hi, you should put the conditional in a callback, because when execution reaches the conditional xml parsing might not have finished parsing. var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(someTextVar); xml.onLoad = function(success:Boolean):Void { if (xml.status == 0) {

Re: [Flashcoders] Error check for parseXML()

2006-10-06 Thread Gustavo Teider - Adobe Flash Developer
Mendelsohn, Michael escreveu: Hi list... According to the help docs, public parseXML(value:String) : Void I think that when did you use :Void , the function doesn´t return any value ... try it public parseXML(value:String):String { } -- Gustavo Teider ( gugateider )

Re: [Flashcoders] Error check for parseXML()

2006-10-06 Thread Michael Stuhr
Mendelsohn, Michael schrieb: Hi list... According to the help docs, public parseXML(value:String) : Void doesn't return an integer or anything to indicate successful parsing of the xml. How can I be certain that I've passed in some error free xml and it was able to parse? the XML-Object

Re: [Flashcoders] Error check for parseXML()

2006-10-06 Thread Anggie Bratadinata
How about xmlobj.status ? If the xml is successfully loaded and parsed, you get 0 on the output panel. Otherwise, you get a negative number (-2 , ... -10). -2: A CDATA is not closed -3: The initial XML declaration is malformed -4: The DOCTYPE declaration is malformed -5: A comment has no closed

RE: [Flashcoders] Error check for parseXML()

2006-10-06 Thread Mike Keesey
Use the XML.status field. var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(someTextVar); if (xml.status == 0) { trace(Success!); } else { trace(Error in XML! Code: + xml.status); } ― Mike Keesey -Original Message- From: [EMAIL PROTECTED]