This is my AS2 code:[FONT=monospace]
[/FONT]
System.useCodepage=true;
var xml:XML = new XML();
xml.ignoreWhite=true
xml.load("http://www.flasherblog.com/yeni/read/dergi_oku.php");
//
xml.onLoad = function (ok) {
trace(xml);
}
[FONT=monospace]
When you test there is no error.
This is the AS3 version of that code:
[/FONT]
System.useCodePage=true;
var testXML:XML = new XML();
var urlLoader:URLLoader =new URLLoader();
urlLoader.load(new URLRequest("http://www.flasherblog.com/yeni/read/dergi_oku.php"));
urlLoader.addEventListener(Event.COMPLETE, onXMLLoad);
function onXMLLoad(e:Event):void {
testXML = new XML(urlLoader.data);
testXML.ignoreWhitespace=true;
trace(testXML);
}
[FONT=monospace] When I test it, I am getting this error:
[/FONT]
TypeError: Error #1090: XML parser failure: element is malformed.
at Untitled_fla::MainTimeline/onXMLLoad()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
[FONT=monospace]
What is the problem? How can I solve this?
[/FONT]