title: Convert string to Dom node javascript?
body: <p><br/>
  i have this code</p>
  
  <pre><code>var tmpEl = document.createElement('div')
  tmpEl.innerHTML = stringEl;
  return tmpEl.firstChild
  </code></pre>
  
  <p>which i use for converting text to Dom node.
  The problem is that if <code>stringEl</code> contains <code>&lt;tr&gt;</code> tag i must create <code>table</code> tag not <code>div</code> for this to work.Also if want this code to work with <code>stringEl</code> contaning <code>li</code> tag i must create <code>ol</code> or <code>ul</code> insted of <code>div</code> tag. Is there any generic for converting string to Dom node?<br/>
  Best Regards,<br/>
  Iordan</p>