How to select this text  using pure javascript, no jquery?
<p>I need to select some text using javascript (no jquery), and Im not sure how to do it. I need to select the text ('Hello World') in myClass element before the first child element. Here are two examples, sometimes it will be an <code>&lt;img&gt;</code> tag as the first element and sometimes it will be a <code>&lt;br&gt;</code> tag. I also need to select the text between the <code>&lt;br&gt;</code> tags.</p>

<pre><code>&lt;p class="myClass" style="padding: 5px;"&gt;  
    Hello World

    &lt;img src="http://xyz.com/image.gif"&gt;                                            
    &lt;br&gt;
    30-12-2011 19:45
    &lt;br&gt;
    Testing
    &lt;br&gt;
&lt;/p&gt;





&lt;p class="myClass" style="padding: 5px;"&gt;  
    Hello World                                                                         
    &lt;br&gt;
    30-12-2011 19:45
    &lt;br&gt;
    Testing
    &lt;br&gt;
&lt;/p&gt;
</code></pre>

<p><strong>Edit note:</strong> I also need to select the other text nodes in myClass. And note that sometimes there will be an <code>&lt;img&gt;</code> as one of the child elements and sometimes there won't.</p>

<p>So I would like to end up with</p>

<pre><code>var a = 'Hello World'
var b = '30-12-2011 19:45'
var c = 'Testing'
</code></pre>

<p>Anyone able to do this?</p>
