XML 验证:解析属性名称时出错

发布于 2024-09-13 16:59:33 字数 1524 浏览 11 评论 0原文

我遇到了 XML 验证问题。这一点:

<script type="text/javascript">
oxm_ad = {"website":"cca9e4b4-7ed2-848z-ffea-067efabc891a",
"size":"468x60",
"floor":"0.01",
"beacon":"<div id='beacon_017a6c9ega' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://www.website.com/openx/www/delivery/lg.php?bannerid=1&amp;campaignid=1&amp;zoneid=4&amp;loc=http%3a%2f%2flocalhost%2fproject-debug%2fproject.html&amp;cb=014a7c8eda&amp;bannerid=-1' width='0' height='0' alt='' style='width: 0px; height: 0px;' </img></div>",
"fallback":"<a href='http://www.website.com/openx/www/delivery/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=014a7c8eda__oadest=http%3a%2f%2fwww.website.com' target='_blank'><img src='http://www.website.com/openx/www/delivery/ai.php?filename=mybanner.png&amp;contenttype=png' width='468' height='60' alt='' title='' border='0' /></a><div id='beacon_014a7c8eda' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://www.website.com/openx/www/delivery/lg.php?bannerid=1&amp;campaignid=1&amp;zoneid=4&amp;loc=http%3a%2f%2flocalhost%2fproject-debug%2fproject.html&amp;cb=014a7c8eda' width='0' height='0' alt='' style='width: 0px; height: 0px;' </img></div>"};
</script>

结果是:

该页面包含以下内容 错误:第 5 行第 246 列错误: 解析属性名称时出错

我不确定我的错误是什么。关于如何纠正这个问题有什么建议吗?

谢谢你!

-拉克斯米迪

I've got an XML validation problem. This bit:

<script type="text/javascript">
oxm_ad = {"website":"cca9e4b4-7ed2-848z-ffea-067efabc891a",
"size":"468x60",
"floor":"0.01",
"beacon":"<div id='beacon_017a6c9ega' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://www.website.com/openx/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproject-debug%2fproject.html&cb=014a7c8eda&bannerid=-1' width='0' height='0' alt='' style='width: 0px; height: 0px;' </img></div>",
"fallback":"<a href='http://www.website.com/openx/www/delivery/ck.php?oaparams=2__bannerid=1__zoneid=4__cb=014a7c8eda__oadest=http%3a%2f%2fwww.website.com' target='_blank'><img src='http://www.website.com/openx/www/delivery/ai.php?filename=mybanner.png&contenttype=png' width='468' height='60' alt='' title='' border='0' /></a><div id='beacon_014a7c8eda' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://www.website.com/openx/www/delivery/lg.php?bannerid=1&campaignid=1&zoneid=4&loc=http%3a%2f%2flocalhost%2fproject-debug%2fproject.html&cb=014a7c8eda' width='0' height='0' alt='' style='width: 0px; height: 0px;' </img></div>"};
</script>

results in:

This page contains the following
errors: error on line 5 at column 246:
error parsing attribute name

I'm not sure what my error is. Any suggestions on how to correct this problem?

Thank you!

-Laxmidi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疏忽 2024-09-20 16:59:33

您似乎缺少两个 标记上的结尾 > 。即它应该是:

<img src='... height: 0px;'> </img>

而不是您当前所拥有的:

<img src='... height: 0px;' </img>

下一行有相同的错误。看看是否可以解决问题?

It looks like you're missing the end > on both of your <img> tags. I.e. it should be:

<img src='... height: 0px;'> </img>

Instead of what you currently have:

<img src='... height: 0px;' </img>

The next line has the same error. See if that fixes the problem?

梦过后 2024-09-20 16:59:33

标签现在没有配对 结束标签,而是使用 < /代码>

<img> tag now has no paired </img> end tag instead use <img src="...." />

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文