简体   繁体   English

如何解决这个错误“元素类型”头“必须由匹配的结束标记”</ head>“终止>?

[英]How to solve this error “The element type ”head“ must be terminated > by the matching end-tag ”</head>"?

Why i'm getting this error 为什么我收到这个错误

Using org.apache.xerces.parsers.SAXParser Exception net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException: The element type "head" must be terminated by the matching end-tag "". 使用org.apache.xerces.parsers.SAXParser异常net.sf.saxon.trans.XPathException:org.xml.sax.SAXParseException:元素类型“head”必须由匹配的结束标记“”终止。 org.xml.sax.SAXParseException: The element type "head" must be terminated by the matching end-tag "". org.xml.sax.SAXParseException:元素类型“head”必须由匹配的结束标记“”终止。

When i check this site http://visaraimpex.com/ in http://www.w3.org/2003/12/semantic-extractor.html 当我在http://www.w3.org/2003/12/semantic-extractor.html上查看这个网站http://visaraimpex.com/

I think that these two lines are part of the problem: 我认为这两行是问题的一部分:

<script src="js/jquery-1.3.2.min.js" type="text/javascript"/></script>
<script src="js/dropdown.js" type="text/javascript"/></script>

Since this is XHTML (according to the DOCTYPE), you can either change "/>" to ">", or delete the "</script>". 由于这是XHTML(根据DOCTYPE),您可以将“/>”更改为“>”,或删除“</ script>”。

This illustrates the kind of problems you have trying to extract stuff from real-world HTML. 这说明了您尝试从真实HTML中提取内容的问题。 If that is what you are doing, maybe you should be using HTMLTidy or a similar "permissive" HTML parser rather than a strict parser. 如果你正在做的事情,也许你应该使用HTMLTidy或类似的“宽容”HTML解析器而不是严格的解析器。

You close your <script> tags twice: 您关闭<script>标记两次:


<script src="js/jquery-1.3.2.min.js" type="text/javascript"/></script>

Remove </script> and it should work. 删除</ script>,它应该工作。

Replace the head part of your HTML code with the following snippet: 使用以下代码段替换HTML代码的head部分:

<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title>Visara Impex</title>
    <meta name="keywords" content="">
    <meta name="Visara Impex" content="">

    <link href="default.css" rel="stylesheet" type="text/css" media="screen">

    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="js/dropdown.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/rb.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
             $("#menu li:nth-child(1)").addClass("current_page_item");
             $("#menu").css("background" , "url(images/nav/7.jpg) no-repeat left top");
        });
    </script>
</head>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 元素类型“标签”必须以匹配的结束标签“</tag> ” - The element type "tag" must be terminated by the matching end-tag "</tag>" 元素类型“META”必须以匹配的结束标签“</META> ” - The element type “META” must be terminated by the matching end-tag “</META>” 元素类型 X 必须由匹配的结束标记终止 - The element type X must be terminated by the matching end-tag TypeError:错误#1085:元素类型“ opi1”必须以匹配的结束标记“ </opi1> ” - TypeError: Error #1085: The element type “opi1” must be terminated by the matching end-tag “</opi1>” XML CDATA错误:元素类型 <X> 必须以匹配的结束标签终止 </X> - XML CDATA error: The element type <X> must be terminated by the matching end-tag </X> SaxParseException 元素类型“hr”必须由匹配的结束标记“终止</hr> “。在使用 jaxb 读取 xml 时 - SaxParseException The element type "hr" must be terminated by the matching end-tag "</hr>". while reading xml with jaxb 元素类型“xsd:schema”必须由匹配的结束标签“”终止 - The element type “xsd:schema” must be terminated by the matching end-tag “</xsd:schema>” “img”必须由匹配的end-tag终止 - “img” must be terminated by the matching end-tag "xs:element" 必须由匹配的结束标签 "" 我找不到错误 - "xs:element" must be terminated by the matching end-tag "</xs:element>" i can´t find error hive-site.xml:元素类型“configuration”必须由匹配的end-tag终止“ </configuration> ” - hive-site.xml: The element type “configuration” must be terminated by the matching end-tag “</configuration>”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM