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 \n or textnode is considered a child ,how can i remove these from childNodes?
nodeType. Text Nodes will havenodeType = 3. Demo.\nbut can'tchildren