I am trying to get the value of a div using agilitypack.my html code is like this :
<div class="div_5">
<p>First Paragraph</p>
<p>Second Paragraph</p>
<p>Third Paragraph</p>
<p>Fourth Paragraph</p>
<div class="div_6">
<p>First Paragraph</p>
<p>Second Paragraph</p>
<p>Third Paragraph</p>
<p>Fourth Paragraph</p>
</div>
<p>other Paragraph</p>
<p>other Paragraph</p>
</div>
I need the content of div_5
without the content of div_6
,so i use this code :
newsContent.Content = resultat1.DocumentNode.SelectSingleNode("//div[@class='div_5']").InnerHtml;
But this code contains div_5
and div_6
.how can i remove div_6
from my value ?