JQuery: How to properly indent a string when looping over dom elements
<p>Code is here <a href="http://jsfiddle.net/Ea7hd/1/" rel="nofollow">http://jsfiddle.net/Ea7hd/1/</a></p>

<p>Basically my output needs to match the indentation of the html elements as they appear in the textarea.  </p>

<p>The problem is that when I am looping through all the elements in the textarea I have no way of adding proper indentation because the I have no way of setting where one element is in relation to its parent.</p>
