2010-06-05 20 views
0

我試圖讓Flex 3和OpenX一起工作。在Safari和Firefox中一切都很好。但是,我在Internet Explorer中收到了一個XML解析器錯誤,這使我想撕掉頭髮並喝掉松節油。請Kneecap我的錯誤 - XML解析器錯誤使用Flex 3,IE中的OpenX

我儘量簡化問題,盡我所能。基本上,我把adReturn,然後把它變成XML。

adReturn = '<adXMLReturn>' + adReturn + '</adXMLReturn>'; 
xmlReturn = new XML(adReturn); 

我不認爲IE喜歡adReturn,低於:

"<adXMLReturn> 

<SCRIPT type=text/javascript><!--//<![CDATA[ 
    var m3_u = (location.protocol=='https:'?'https://www.dcscore.com/openx/www/delivery/ajs.php':'http://www.dcscore.com/openx/www/delivery/ajs.php'); 
    var m3_r = Math.floor(Math.random()*99999999999); 
    if (!document.MAX_used) document.MAX_used = ','; 
    document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u); 
    document.write ("?zoneid=4"); 
    document.write ('&amp;cb=' + m3_r); 
    if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used); 
    document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : '')); 
    document.write ("&amp;loc=" + escape(window.location)); 
    if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer)); 
    if (document.context) document.write ("&context=" + escape(document.context)); 
    if (document.mmm_fo) document.write ("&amp;mmm_fo=1"); 
    document.write ("'><\/scr"+"ipt>"); 
//]]>--></SCRIPT> 



<SCRIPT type=text/javascript src="http://www.dcscore.com/openx/www/delivery/ajs.php?zoneid=4&amp;cb=42464397192&amp;charset=utf-8&amp;loc=http%3A//www.dcscore.com/"></SCRIPT> 

<A href="http://www.dcscore.com/openx/www/delivery/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=80291ee9b3__oadest=http%3A%2F%2Fwww.dcscore.com" target=_blank><IMG title="" border=0 alt="" src="http://www.dcscore.com/openx/www/delivery/ai.php?filename=mybanner.png&amp;contenttype=png" width=468 height=60></A> 

<DIV style="POSITION: absolute; VISIBILITY: hidden; TOP: 0px; LEFT: 0px" id=beacon_80291ee9b3><IMG style="WIDTH: 0px; HEIGHT: 0px" alt="" src="http://www.dcscore.com/openx/www/delivery/lg.php?bannerid=1&amp;campaignid=1&amp;zoneid=4&amp;loc=http%3A%2F%2Fwww.dcscore.com%2F&amp;cb=80291ee9b3" width=0 height=0></DIV><NOSCRIPT></NOSCRIPT></adXMLReturn>" 

是否有人看到adReturn一個問題嗎?幫幫我!

謝謝!

-Laxmidi

回答

1

它是如此明顯的 - 我很驚訝,你可能你已經錯過了它,因爲XML是如此的美麗,易於閱讀 - 這是有史以來最好的事情:P

XML Parsing Error: not well-formed 
Line Number 3, Column 14 
<SCRIPT type=text/javascript><!--//<![CDATA[ 
-------------^ 

OK當存在問題時,所有開玩笑的XML都是醜陋的和折磨的,因此存在JSON和更好的YAML的問題 - 這是一種有效存儲和傳輸數據的方式,這對於人類和計算機來說都很容易處理。

無論如何,這裏是我發現問題的方法:XML Validator下次使用時請避免在生活中過早丟掉頭髮。

+0

嗨Khorkrak,非常感謝您的留言。驗證器很棒。我得到了: 1)本頁包含以下錯誤:第3行第26列的錯誤:AttValue:「or'expected。 因此,我在