0

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

Laxmidi
  • 2,650
  • 12
  • 49
  • 81

1 Answers1

1

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.

Khorkrak
  • 3,911
  • 2
  • 27
  • 37
  • Hi Khorkrak, Thanks so much for your message. The validator is great. I got: 1) This page contains the following errors: error on line 3 at column 26: AttValue: " or ' expected. So, I added parentheses around "text/Javascript" in – Laxmidi Jun 05 '10 at 16:27
  • (continued) Hi Khorkrak, 3) Then I got: This page contains the following errors: "error on line 23 at column 177: AttValue: " or ' expected". Any suggestions on solving this error? I agree with you. XML is a pain. But, at least we're close to nailing this sucker! Thank you! -Laxmidi – Laxmidi Jun 05 '10 at 16:29
  • Hi Khorkrak, I used the validator and inputted one group of tags at a time and finally got it to validate. Lots of missing quotation marks. Again, thanks for the help. -Laxmidi – Laxmidi Jun 05 '10 at 20:52