You can use the following function to convert the text "HTML" to the element
function htmlToElement(html)_x000D_
{_x000D_
var element = document.createElement('div');_x000D_
element.innerHTML = html;_x000D_
return(element);_x000D_
}_x000D_
var html="<li>text and html</li>";_x000D_
var e=htmlToElement(html);
_x000D_