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.
Tags:
Related posts:
Leave a comment
Recent Posts
Recent Comments
Tags
Archives
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- November 2009
- July 2009
- May 2009
- April 2009
- January 2009
- October 2008
- September 2008
- August 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- November 2006
- February 2006
- January 2006
- December 2005



