AS3 XML object not throwing exception if invalid data is given?

Haxing4Life

New Member
I remember darkly that the XML class in AS3 would throw an exception if you tried to give it data in it's constructor that was not a valid XML string. But now I got a case where the XML happily takes every kind of data no matter it's valid XML or not...\[code\]var xml:XML;try{ xml = new XML("Some bogus string content."); _valid = true;}catch (err:Error){ _valid = false;}\[/code\]... am I missing something??Update:Qname somehow is null but somehow it's not, see here:\[code\]var qname:QName = xml.name();if (!qname.localName){ _valid = false;}\[/code\]... throws an exception. Obvioulsy qname is null! But ...\[code\]var qname:QName = xml.name();if (!qname || !qname.localName){ _valid = false;}\[/code\]... doesn't throw any exception. qname seems not to be null. WTH?
 
Top