Convert html (Ad) Codes to xml or Plain text

In blogging, There are three major ways to put or insert your Google AdSense Ad Code into Blogger's blogs which are :

  • Using the blogger “Earnings” tab in your blog dashboard; 
  • Via the use of AdSense widgets; and 
  • Adding ad code directly into HTML/JavaScript Widgets, posts, pages and templates.



It no more news that the Google AdSense is fully integrated with Blogger. But, most bloggers are really surprised why their AdSense Ad units code was not showing the Adverts within their own Google AdSense approved blogger blog itself. 


You will notice whenever you tried  to insert the ad code directly into blogger template, it results either later showing blank ads or HTML error message like: 

When you try to preview your template 
“Could not load template preview: Error parsing XML, line 1835, column 10: Attribute name “async” associated with an elementtype “script” must be followed by the ‘ = ‘character.”,
And showing XML (Extensible Markup Language). 
And when try it to Save your template 
“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 content of elements must consist of well-formed character data or markup.”

Do you realize that you can't straightforwardly embed Google AdSense Ads code inside blogger layouts through EDIT HTML include in blogger blog. In any case, We need to change over, parse or change the code utilizing a basic trap by simply supplanting just the three extraordinary content characters into basic string content configurations:

  • The left angle bracket ( <) replace with ( &lt; )
  • The right angle bracket ( >) replace with ( > )
  • The double-quote character ( ) replace with (" )

You may however utilize our a single tick HTML/JavaScript parser encoder instrument to dispose of  error while changing AdSense code for your blog.

Make use of below html code parser to convert your ad codes (AdSense, Azooge, MediaNet etc)




No comments:

Leave a comment

Please drop your comments before you leave. Your comments are highly appreciated. Click HERE to learn how to Comment On Our Horlartechgist. You can also GET IN TOUCH with us via our Social Media Platforms.