Question

I'm trying to get Flex 3 and OpenX to work together. Everything works great in Safari and Firefox. But, I get an XML parser error in Internet Explorer, which makes me want to rip my hair out and drink turpentine.

I've tried to simplify the problem as best I can. Basically, I take the adReturn and then turn it into xml.

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

I don't think that IE likes adReturn, which is below:

"<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>"

Does someone see a problem in adReturn? Help!

Thank you!

-Laxmidi

Was it helpful?

Solution

It's so obvious - I'm astounded that you could you have missed it because XML is so beautiful and easy to read - it's the best thing ever :P

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

OK all kidding aside XML is ugly and torture to read through when there's a problem that's why there's JSON and even better YAML - a way to efficiently store and transfer data that's easy for both humans and computers to deal with.

Anyway, here's how I found the problem: XML Validator Use that next time to avoid losing your hair too early in life.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top