i have problem with childNodes
as below :
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Coca Cola</li>
</ol>
//childNodes.length = 7
but
<ol><li> Coffee </li><li> Tea </li><li> Coca Cola </li></ol>
//childNodes.length = 3
It seems each
or textnode
is considered a child
,how can i remove these from childNodes
?