title: Groovy , parse html with XmlSlurper , how to get the html code in a node?
body: <p>i am parsing an html page using XmlSlurper and HtmlCleaner, i have the GPathResult with </p>
  
  <pre><code>def page = new XmlSlurper(false,false).parseText(xml)
  </code></pre>
  
  <p>now i can use GPath to access the various nodes.</p>
  
  <p>In the html i have a paragraph like this one:</p>
  
  <pre><code>&lt;p&gt;
   some_text1
   &lt;br /&gt;
   some_text2
   &lt;br /&gt;
   some_text3
   &lt;br /&gt;
  
   ....
   some_textN
  
  
   &lt;br /&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>the problem is that now i don't know how to parse the text in the paragraph, i need to split the text inside the paragraph using the <code>&lt;br /&gt;</code> tag as separator and get a list like</p>
  
  <pre><code>[some_text, some_text1, some_text2, .... ,some_textN]
  </code></pre>
  
  <p>Having the node like</p>
  
  <pre><code>def node = page.body.some_path.p[0]
  </code></pre>
  
  <p>if i use text() i get all the text in the paragraph but without the <code>&lt;br /&gt;</code> so i cannot use the split method, and i don't find a way to get the real html inside the paragraph from the node.</p>
  
  <p>There is some way to parse this text?</p>
  
  <p>Thanks for the help.</p>