How to fix "Error Parsing XML line ..., column ...The reference to entity "version" must end with the ';' delimiter."

Overview

In Blogger, you want to add a Facebook Comment, Like Button, Facebook Page or other Social Plugins, when you insert the JavaScript SDK in your blogger template editor.


How to fix "Error Parsing XML



Facebook Comment Example
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.12';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

You often come across XML Parsing errors, the following error:

Error parsing XML, line ..., column ...:
The reference to entity "version" must end with the ';' delimiter.

Because the Blogger blogs are coded in XHTML and  XML is quite strict in following correct syntax formatting than HTML.

How to resolve the Error parsing XML?


You only need to escape all 5 special characters.

Find < then replace all with &lt;
Find > and replace all with &gt;
Find & and replace all with &amp;
Find ' and replace all with &#039;
Find " and replace all with &quot;

Then you should find that error disappears.

Hope you have successfully added Plugins in your Blogger. If you have any problems please to leave a comment below.

Previous Post
Next Post

post written by: