Blogger模板“XML错误消息”]

时间:2013-01-06 17:28:56

标签: xml templates blogger

需要有关博客模板的HTML帮助 - 它说“你的模板无法解析,因为它的格式不正确。请确保所有XML元素都正确关闭.XML错误消息:prolog中不允许内容”

我改变了他们要求我解决的一些问题,例如“第231行第2栏需要结束html标签”或类似的事情,但现在我不知道他们在问什么,我还没有'在html中获得了那么多的背景知识。 d:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Love in winter.</title>

<script type="text/javascript">
function changeNavigation(id)
{document.getElementById('main').innerHTML=document.getElementById(id).innerHTML}
</script>

<style type="text/css">
body{
background: url(http://i413.photobucket.com/albums/pp217/cottonlovescandy/bgbg-1.gif);
font-size: 11px;
color: #777777;
line-height: 150%;
font-family: arial;
font-weight: normal;
cursor:url("http://lovelycore.com/hand.ani");}

body, td, th{
color: #777777;
font-size: 11px;
line-height: 15px;
font-family: arial;}

strong {color: #ED8F99;}
i {color: #ffafaf;}
s {color: #ffafaf;}
b {font-family: "arial", sans-serif; color: #ffafaf;}
u {color: #6C6461; border-bottom: 1px solid #B3DE69; text-decoration: none;}

A:link
{text-decoration: none; color: #777777; cursor: url("http://digilander.libero.it/loredanatemplate/cursori/145.ani");}
A:visited
{text-decoration: none; color: #777777; cursor: url("http://digilander.libero.it/loredanatemplate/cursori/145.ani");}
A:active
{text-decoration: none; color: #777777; cursor: url("http://digilander.libero.it/loredanatemplate/cursori/145.ani");}
A:hover
{text-decoration: none; color: #ffafaf; cursor: url("http://digilander.libero.it/loredanatemplate/cursori/145.ani");}

select, input, textarea{
padding: 4px;
font-size: 11px;
color: #C0B09A;
font-family: verdana;
border: 1px solid #FFDBFF;
background-color: #FFF7FF;}

blockquote{
padding: 5px;
color: #666666;
font: 11px arial;
letter-spacing: 1px;
border: 1px solid #ffafaf;
}

.box{
text-align: justify;
background-color: #1E1E1E;}

.heading{
color: #FFAFAF;
font-size: 20px;
line-height: 19px;
letter-spacing: -1pt;
font-family: century gothic;}

.head4{
padding: 6px;
color: #996633;
font-size: 20px;
line-height: 19px;
text-align: center;
font-weight: none;
letter-spacing: 1px;
font-family: century gothic;}

.blogger-labels{
color: #70C3B0;
font: 8pt georgia;
text-transform: lowercase;}

.image{
padding: 5px;
background: #F4F7EC;
border: 1px solid #E8E6DA;}

.date{
font: 7pt arial;
color: #808080;
text-align: right;
line-height: 11pt;
margin-right: 10px;
letter-spacing: 2px;
text-transform: uppercase;
background-color: #FBFBFB;
border-top: 1px solid #DCDCDC;
border-bottom: 1px solid #DCDCDC;}

.title{
padding: 5px;
font-size: 18pt;
color: #ffafaf;
text-align: right;
font-family: calibri;
font-weight: none;
letter-spacing: -2px;
text-transform: lowercase;
}

#entry {text-align: justify;}
#footer{text-align: center; border-top: 1px solid #ffffff;}

::-moz-selection {color: #999999; background: #EEEEEE;}

.h1{
font-size: 9pt;
color: #FFFFFF;
font-weight: bold;
font-family: "Georgia", serif;
border-bottom: 1px solid #FDE8D7;
-moz-border-radius: 5px 0px 10px 0px;
background-color: #FFADAD;
text-align: center;
margin: 0 0 5px;
line-height: 190%;}

.h2{
font-size: 15pt;
text-align: right;
color: #A5A5A5;
line-height: 100%;
font-weight: none;
border-bottom: 1px solid #E2E2E2;}

.border{
border-right : 1px solid #DCDCDC;
padding : 0px 5px 20px 0px; }

#navigation {
  height:2.7em;
  line-height:2.7em;
background-color:#FFADAD;
}

#navigation ul {
  margin:0;
  padding:0;
}

#navigation li {
border-color:white;
  float:left;
  margin:0;
  padding:0;
  list-style-type:none;
  border-top:none;
  white-space:nowrap;
}

#navigation li a {
color:white;
  display:block;
  padding:0 18px;
  font-size:0.8em;
  text-transform:uppercase;
  letter-spacing:1px;
}

#navigation a:hover
  {background-color:#ffbbbb}

* html #navigation a {width:1%;} 

#navigation form {
  border-color:white;
  background:#FEC42D url(http://img295.imageshack.us/img295/7783/blogyblixcornerbottomriwa5.gif) bottom right no-repeat;
  float:right;
  height:100%;
  width:189px;
  padding:0 15px;
  border-left:1px solid;
  line-height:0;
}

#navigation form fieldset {
  margin-top:7px;
  border:0 solid; 
}
* html #navigation form fieldset {margin-top:7px;}

#navigation #s {
border-color:#FFF9EA;
  height:1.5em;
  width:140px;
  margin:0 5px 0 0;
  padding:0;
  border:1px solid;
  font-size:0.8em;
  vertical-align:middle;
}

#navigation #searchbutton {
  color:white;
  background-color:#ffffff;
  height:2em;
  width:auto;
  padding:0 1px;
  border:1px solid;
  font-size:9px;
  letter-spacing:1px;
  text-align:center;
  vertical-align:middle;
}


</style>

<link rel="me" href="http://www.blogger.com/profile/03121445148229752476" />
<link rel="openid.server" href="http://www.blogger.com/openid-server.g" />
<!-- --><style type="text/css">@import url(http://www.blogger.com/static/v1/v-css/navbar/697174003-classic.css);
div.b-mobile {display:none;}
</style>
</head>

<noembed>
<body><script type="text/javascript">function setAttributeOnload(object, attribute, val) {if(window.addEventListener) {window.addEventListener("load",function(){ object[attribute] = val; }, false);} else 
</script></body></noembed> </html>



<div style="position: absolute;  left: 135px; top: 12px;">
<table width="450" border="0" cellpadding="8" cellspacing="0" bgcolor="#FFFFFF">
<tr><td colspan="2"><img src="http://i413.photobucket.com/albums/pp217/cottonlovescandy/emolovee.gif">
<div id='navigation'>
  <ul>
 <center><li class='selected'><a href='#'>Home</a></li>
 <li><a href='http://oreocheezecake.blogspot.com'>designer</a></li>
 <li><a href='msnim:add?contact=yourmailhere@hotmail.com'>MSN</a></li>
 <li><a href='http://blogskins.com/me/_oreos_'>Blogskins</a></li>
 <li><a href='http://www.facebook.com/'>Facebook</a></li>
 </center>
  </ul></div></td></tr>

<tr valign="top">
<td width="230">
<div class="border">
<div class="h1">Music</div>
<center>
Your playlist here.
</center><br>

<div class="h1">Disclaimer</div>
<center>여기에서 환영 ! <br>Welcome to <font color=#ffafaf>yoururlhere.blogspot.com</font>!<br>
This site is best viewed in <font color=#ffafaf>Internet Explorer</font>. And please forebear from <font color=#ffafaf>copying</font> or <font color=#ffafaf>ripping</font> anything from here that does not belong to you. 
Thank you for coming by.<br><br>
<center><img src="http://i495.photobucket.com/albums/rr312/angelicreations/graphics/sitestats/screenstats2_pink.gif" border="0" ><br> </center>
</center>
<br>

<div class="h1">Tagboard</div>
Your tagboard.
<br>



<div class="h1">Webmistress</div>
Your profile.<br><br>

<br></center>

<div class="h1">Affilates</div>
<center>
Your Link here.
<br>

<div class="h1">Blog Archives</div>
  <div align="left"><BloggerPreviousItems> <br>
♥<a class="link" href="<$BlogItemPermalinkURL$>"> <$BlogPreviousItemTitle$></a>
</BloggerPreviousItems></div><br>

<center><form name="htmlp1" ACTION=URI>
    <select name="menu" onchange="jump(this.form)"
    style="font-family:Tahoma; font-align:center;"
    style="color:#ffafaf;"
    style="font-size:8pt;"
    style="background: url(http://dl4.glitter-graphics.net/pub/678/678644gz6asg8ibk.png); ">
    <option value="#">Click ♥</option><BloggerArchives>
    <option value="<$BlogArchiveURL$>"> ♥ <$MTArchiveTitle$></option></BloggerArchives>
    </select>
    </form></center>
<br>
<div class="h1">Thank You</div>
<center>Please do not remove credits. </center>
<center><a href="http://piggybacked.blogspot.com/" target="_blank"><img src="http://i413.photobucket.com/albums/pp217/cottonlovescandy/2button.gif" border="0"></a><br>
This blogskin is proudly designed by <b><a href="http://piggybacked.blogspot.com">Fan</a><a href="http://www.blogskins.com/me/_oreos_">ny.</a>♥</b><br>
</center><img src="http://i26.tinypic.com/2vb0y0y.gif"> <a href="http://www.blogskins.com/me/piinkifiedd">Basecodes 1</a> l Piinklifiedd<br>
<img src="http://i26.tinypic.com/2vb0y0y.gif"> <a href="http://www.blogskins.com/me/indreamsmaybe">Basecodes 2</a> l InDreamsMaybe<br>
<img src="http://i26.tinypic.com/2vb0y0y.gif"> <a href="http://www.blogskins.com/me/mssockpuppet">codes 1</a> l Ms.SockPuppet<br>
<img src="http://i26.tinypic.com/2vb0y0y.gif"> <a href="http://www.little-miss-wendy.com/">codes 2</a> l Little-Miss-Wendy<br>
<img src="http://i26.tinypic.com/2vb0y0y.gif"> <a href="http://cyworld.com/">Materials 1</a> l cyworld<br>
<img src="http://i26.tinypic.com/2vb0y0y.gif"> <a href="http://angelicreations.co.nr/">Materials 2</a> l Angelicreations<br>


<p></p></td>
</div>
<td width="600" id="main">
<MTEntries lastn="7">
<div class="title"><font style="font-family: trebuchet ms; color: #A2C5D6; font-size: 20pt;"></font> <$BlogItemTitle$></div>
<div class="date"><MTDateHeader><$MTEntryDate format="%B %e, %Y"$></MTDateHeader> | <$MTEntryDate format="%I:%M:%S %p"$> </div><br>
<div align="left"><$MTEntryBody$></div><br>
</MTEntries><br>

</div><br /></div></td></td></tr><tr><td colspan="2"></td></tr></table></div></body>


 <script language=JavaScript>
                <!--

                //Disable right click script III- By Renigade (renigade@mediaone.net)
                //For full source code, visit http://www.dynamicdrive.com

                var message="";
                ///////////////////////////////////
                function clickIE() {if (document.all) {(message);return false;}}
                function clickNS(e) {if 
                (document.layers||(document.getElementById&&!document.all)) {
                if (e.which==2||e.which==3) {(message);return false;}}}
                if (document.layers) 
                {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
                else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

                document.oncontextmenu=new Function("return false")
                // --> 
                </script></html>

请帮助D:谢谢!

3 个答案:

答案 0 :(得分:1)

此验证错误有点棘手。 “prolog中不允许内容”通常意味着文件开头有一个非法字节。这有时是在编辑器中编辑文件而不是正确保存为没有字节顺序标记的UTF-8引起的。看看这个:Content is not allowed in prolog

我使用XML验证器检查了您的博客模板,文件中仍然存在大量错误。我首先使用http://validator.w3.org/检查文件,然后确保xml是有效的utf-8。我怀疑它不是因为那里有♥字符看起来不正确。

答案 1 :(得分:0)

您将正文和HTML标记放在错误的位置..

从第228行到第231行:

<noembed>
<body><script type="text/javascript">function setAttributeOnload(object, attribute, val) {if(window.addEventListener) {window.addEventListener("load",function(){ object[attribute] = val; }, false);} else 
</script></body></noembed> </html>

应该是:

<body><noembed><script type="text/javascript">function setAttributeOnload(object, attribute, val) {if(window.addEventListener) {window.addEventListener("load",function(){ object[attribute] = val; }, false);} else 
</script></noembed>

第316行:

</div><br /></div></td></td></tr><tr><td colspan="2"></td></tr></table></div></body>

删除</body>

第337行:

       </script></html>

替换为:

       </script></body></html>

请哦,请确保您的标签放置正确!只需将其放在IDE中,即可看到HTML标记未正确关闭或结构化。

答案 2 :(得分:0)

org.xml.sax.SAXParseException; lineNumber:8; columnNumber:43;对实体“ l”的引用必须以“;”结尾定界符。