title: Html parsing using Simple Html dom parser
body: <p>I am using simple html dom parser to parse some html.</p>
  
  <p>I have an html like this</p>
  
  <pre><code>&lt;span class="UIStory_Message"&gt;
      Yeah, elixir of life!&lt;br/&gt;
     &lt;a href="asdfasdf"&gt;
        &lt;span&gt;asdfsdfasdfsdf&lt;/span&gt;
         &lt;wbr/&gt;
         &lt;span class="word_break"/&gt;
         61193133389&amp;ref=nf
     &lt;/a&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>My code is</p>
  
  <pre><code>$storyMessageNodes    = $story-&gt;find('span.UIStory_Message');
  $storyMessage         = strip_tags($storyMessageNodest-&gt;innertext);
  </code></pre>
  
  <p>I want to get the text right inside the span "UIStory_Message". ie, "Yeah, elixir of life!".</p>
  
  <p>but the above code gives me the whole text which is inside the whole span.
  ie, "Yeah, elixir of life! asdfsdfasdfsdf 61193133389&amp;ref=nf "</p>
  
  <p>how could i code so that it gives only "Yeah, elixir of life!" ??</p>