Error parsing XML, line 43, column 5: The element type "link" must be terminated by the matching end
Asked by Nazmus Sadat:

When i am going to save below xtml in my blog than showing this message

"Error parsing XML, line 43, column 5: The element type "link" must be terminated by the matching end-tag "\</link\>"

Please help how i can solve this issue.

\<!DOCTYPE html\>  
\<html lang="en"\>  
\<head\>  
\<meta charset="utf-8"\>  
\<meta http-equiv="X-UA-Compatible" content="IE=edge"\>  
\<meta name="viewport" content="width=device-width, initial-scale=1"\>  
\<title\>Daily Shop \| Home\</title\>  

\<!-- Font awesome --\>  
\<link href="css/font-awesome.css" rel="stylesheet"\>  
\<!-- Bootstrap --\>  
\<link href="css/bootstrap.css" rel="stylesheet"\>  
\<!-- SmartMenus jQuery Bootstrap Addon CSS --\>  
\<link href="css/jquery.smartmenus.bootstrap.css" rel="stylesheet"\>  
\<!-- Product view slider --\>  
\<link rel="stylesheet" type="text/css" href="css/jquery.simpleLens.css"\>  
\<!-- slick slider --\>  
\<link rel="stylesheet" type="text/css" href="css/slick.css"\>  
\<!-- price picker slider --\>  
\<link rel="stylesheet" type="text/css" href="css/nouislider.css"\>  
\<!-- Theme color --\>  
\<link id="switcher" href="css/theme-color/default-theme.css" rel="stylesheet"\>  
\<!-- \<link id="switcher" href="css/theme-color/bridge-theme.css" rel="stylesheet"\> --\>  
\<!-- Top Slider CSS --\>  
\<link href="css/sequence-theme.modern-slide-in.css" rel="stylesheet" media="all"\>

\<!-- Main style sheet --\>  
\<link href="css/style.css" rel="stylesheet"\>

\<!-- Google Font --\>  
\<link href='<https://fonts.googleapis.com/css?family=Lato>' rel='stylesheet' type='text/css'\>  
\<link href='<https://fonts.googleapis.com/css?family=Raleway>' rel='stylesheet' type='text/css'\>

\<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --\>  
\<!-- WARNING: Respond.js doesn't work if you view the page via file:// --\>  
\<!--\[if lt IE 9\]\>  
\<script src="[https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"\>\</script]()\>  
\<script src="[https://oss.maxcdn.com/respond/1.4.2/respond.min.js"\>\</script]()\>  
\<!\[endif\]--\>

\</head\>


Answers:
author: Nic Brough -Adaptavist-
body: Most of the tags in that block of code are not closed properly.

For example, in

-----

\<title\>Daily Shop \| Home\<**/**title\>

\<!-- Font awesome --\>  
\<link href="css/font-awesome.css" rel="stylesheet"\>

-----

Lines 1 and 2 are closed properly, but line 3 is not. Note the bold character in the first line.

comments: author: Minh Tran
body: [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454),

<http://www.w3.org/TR/html5/document-metadata.html#the-link-element>  
Tag omission in text/html: No end tag.

<http://www.w3.org/TR/html5/syntax.html#elements-0>  
"Void elements: ... link ..."  
"Void elements only have a start tag; end tags **must not be specified** for void elements."

The link tag does not need the end tag, you can see its specification here "**As it is a void element, the start tag must be present and the end tag must not be present"**

<https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link>

Another thing, the error is pointing to a different line "Error parsing XML, line 43, column 5: The element type "link" must be terminated by the matching end-tag "\</link\>"

So i suspect it happens because of another reason


author: Nic Brough -Adaptavist-
body: Yes, I'm aware of that, but I was looking at the first part of the error message.

Error parsing **XML** , not html. It is well formed html, but it's being processed as though it is XML. Either the program needs to be set to understand that it is html, or it needs to be well-formed xml

Sorry. When I answered the question, I was looking at a system that stores data as XML and dynamically converts it to html when it needed it in that format. I should have explained that the html/xml difference in my original answer


author: Minh Tran
body: True, that is why i was curious how [@Nazmus Sadat](/t5/user/viewprofilepage/user-id/3699012) saved that xhtml into the blog. Then we can isolate why this happened


author: Nazmus Sadat
body: Hi Minh Tran,

Please can you advise me what to do now?


author: Minh Tran
body: [@Nazmus Sadat](/t5/user/viewprofilepage/user-id/3699012) Can you tell me how exact you save above xhtml as blog post?


author: Minh Tran
body: [@Nazmus Sadat](/t5/user/viewprofilepage/user-id/3699012), can you please let me know how you save that content into your blog?

comments: author: Nazmus Sadat
body: i am trying to save this content by Edit Theme HTML. Have any other way? Please advise.

Thanks.

sadat.


Tags: confluence-cloud

xml