Good night then on the blog buddy this time I will discuss "How to easily parse the HTML code for the ad adsense blogger". And hopefully this simple article easy in understand it and can be useful for us all.
Parse HTML is one of the methods required what if we want to put the script adsense ads in a blog post. Different if we put adsense ads in the sidebar, we just need to parse the ad code.
Parse or convert HTML is the process of changing the language of HTML to XML. The trick parse HTML to XML is not a difficult process, it is easy to do, we just need to copy the ad script into a parse box that has been provided, then press the button Parse, the HTML code will be instantly transformed into XML code.
Once the XML code so, please mate stayed paste in place that you want. Ordinary under the code <data: post.body /> to facilitate please use Ctrl + F. usually there are 2 or 3 of this code. in my blog template, I select the code to third.
<div expr:id='"post1" + data:post.id'/>Then save the template and let you see the results, pal Before closing the article How to easily parse the HTML code adsense ads, please provide input in the comment column yes. If my friend find this article useful, do not forget to click the share button :) So that everyone knows
<div class='googlepublisherads' style='margin:10px 0'>
<div class='separator' style='clear: both; text-align: center; '>
ADVERTISEMENT ADSENSE CODE ARE ALREADY IN PRASE
</div>
</div>
<div expr:id='"post2" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>
var obj0=document.getElementById("post1<data:post.id/>");
var obj1=document.getElementById("post2<data:post.id/>");
var s=obj1.innerHTML;
var t=s.substr(0,s.length/2);
var r=t.lastIndexOf("<br>");
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+4);}
</script>