How to add ads code into Blogger Beta
WidgetBucks - Trend Watch - WidgetBucks.com

How to add ads code into Blogger Beta

If you've ever tried to insert the Google Adsense code directly into your Blogger XML Template as you want ads between post (not in the widget sidebar or anywhere else), you'll be stunned like me when you get the following error message.

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The processing instruction target matching "[xX][mM][lL]" is not allowed.


This is because Blogger uses more strict and standardized XML. The above error simply mean the Adsense code is not standardized XML. To solve this, we need to replace all the html character such as '<' with '>' '"' with '"'. Check the example below: This is original code.


This is XML standardized code:


You can use your text editor to replace all the HTML manually. Hey why don't you check out Blogcrowds HTML parser. It is very easy and convenient. Be warned that changing the ads might violate the TOS of your specific ads company. So be sure to check with them to play safe.
AddThis Social Bookmark Button

0 comments: