i have this code
var tmpEl = document.createElement('div')
tmpEl.innerHTML = stringEl;
return tmpEl.firstChild
which i use for converting text to Dom node.
The problem is that if stringEl contains <tr> tag i must create table tag not div for this to work.Also if want this code to work with stringEl contaning li tag i must create ol or ul insted of div tag. Is there any generic for converting string to Dom node?
Best Regards,
Iordan
stringEland what you expect at the end, it might be helpful for understanding your problem.