更新:
嗨,
我已经缩小了问题范围,它似乎出现在代码的这一部分中:
<script type="text/javascript">
oxm_ad = {"website":"cca5e4b8-7ed2-848b-ffea-037efaac851a",
"size":"468x60",
"floor":"0.1",
"beacon":"<div id='beacon_f936906f11' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11&bannerid=-1' width='0' height='0' alt='' style='width: 0px; height: 0px;' \/><\/div>",
"fallback":"<a href='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=f936906f11__oadest=http%3a%2f%2fwww.mywebsite.com' target='_blank'><img src='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/ai.php?filename=mybanner.png&contenttype=png' width='468' height='60' alt='' title='' border='0' \/><\/a><div id='beacon_f936906f11' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11' width='0' height='0' alt='' style='width: 0px; height: 0px;' \/><\/div>"};
</script>
谢谢。
-Laxmidi
嗨,
我收到错误1090,xml解析器错误。我的代码是:
<adXMLReturn><script type="text/javascript"><!--//<![cdata[
var m3_u = (location.protocol=='https:'?'https://www.mywebsite.com/openx/www/delivery/ajs.php':'http://www.mywebsite.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 ('&cb=' + m3_r);
if (document.max_used != ',') document.write ("&exclude=" + document.max_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterset ? '&charset='+document.characterset : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><script type="text/javascript" src="http://www.mywebsite.com/openx/www/delivery/ajs.php?zoneid=4&cb=87015091150&charset=utf-8&loc=http%3a//localhost/property-debug/property.html"></script><script type="text/javascript">
oxm_ad = {"website":"cca5e4b8-7ed2-848b-ffea-037efaac851a",
"size":"468x60",
"floor":"0.1",
"beacon":"<div id='beacon_f936906f11' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11&bannerid=-1' width='0' height='0' alt='' style='width: 0px; height: 0px;' \/><\/div>",
"fallback":"<a href='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=f936906f11__oadest=http%3a%2f%2fwww.mywebsite.com' target='_blank'><img src='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/ai.php?filename=mybanner.png&contenttype=png' width='468' height='60' alt='' title='' border='0' \/><\/a><div id='beacon_f936906f11' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http:\/\/www.mywebsite.com\/openx\/www\/delivery\/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11' width='0' height='0' alt='' style='width: 0px; height: 0px;' \/><\/div>"};
</script>
<script type="text/javascript" src="http://bid.openx.net/jstag"></script><script type="text/javascript" src="http://bid.openx.net/json?c=oxm_72123972249&pid=cca5e4b8-7ed2-848b-ffea-037efaac851a&s=468x60&f=0.1&url=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html"></script><a href="http://www.mywebsite.com/openx/www/delivery/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=f936906f11__oadest=http%3a%2f%2fwww.mywebsite.com" target="_blank"><img src="http://www.mywebsite.com/openx/www/delivery/ai.php?filename=mybanner.png&contenttype=png" alt="" title="" border="0" height="60" width="468"></img></a><div id="beacon_f936906f11" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img src="http://www.mywebsite.com/openx/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11" alt="" style="width: 0px; height: 0px;" height="0" width="0"></img></div></adXMLReturn>
当我在浏览器中打开此代码时,我得到:
此页面包含以下错误:
第1543行第1行的错误:解析属性名称时出错 下面是第一个错误的页面呈现
oxm_ad = {"website":"cca5e4b8-7ed2-848b-ffea-037efaac851a", "size":"468x60", "floor":"0.1", "beacon":"
有谁知道问题可能是什么?
谢谢!
-Laxmidi
答案 0 :(得分:0)
XML区分大小写。尝试使用CDATA
代替cdata
。
答案 1 :(得分:0)
您有style='width: 0px; height: 0px;' \/>
,而\
不是XML中的有效属性。
这里真正的问题是您希望将脚本元素的内容(或者可能是adXMLReturn元素的整个内容)视为文本而您没有正确编码。
如果您希望将某些内容视为文本,则需要:
<
,&
和>
应分别为<
,&
和>
或 请注意,您无法嵌套CDATA部分,因此如果您希望将整个内容视为文本,则需要更改第一个脚本或使用方法一。
如果您使用XML工具而不是手工或使用模板来构建XML,那么它将为您完成所有这些工作。
关于第一个脚本的主题,此刻它已经完全被打破了。除非您确实要对其进行评论,否则请移除<!--
和-->
。您可能希望看到Comments and CDATA了解有关该主题的更多信息。
答案 2 :(得分:0)
好的,我已经明白了。问题出在我提到的脚本块中。我不得不撕掉所有的黑色墨水。
感谢大卫和迈克尔的投入。
修正后的位看起来像:
<script type="text/javascript">
oxm_ad = {"website":"cca5e4b8-7ed2-848b-ffea-037efaac851a",
"size":"468x60",
"floor":"0.1",
"beacon":"<div id='beacon_f936906f11' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://www.mywebsite.com/openx/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11&bannerid=-1' width='0' height='0' alt='' style='width: 0px; height: 0px;' /></div>",
"fallback":"<a href='http://www.mywebsite.com/openx/www/delivery/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=f936906f11__oadest=http%3a%2f%2fwww.mywebsite.com' target='_blank'><img src='http://www.mywebsite.com/openx/www/delivery/ai.php?filename=mybanner.png&contenttype=png' width='468' height='60' alt='' title='' border='0' /></a><div id='beacon_f936906f11' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://www.mywebsite.com/openx/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproperty-debug%2fproperty.html&cb=f936906f11' width='0' height='0' alt='' style='width: 0px; height: 0px;' /></div>"};
</script>