i have the div element
<div title="View this search: Actives">
<div style="float:right;">
<span class="count" title="some title" id="search_201204">
34 New or Changed
</span>
<span id="trash_2012"> X</span>
</div>
The value i need
<div style="padding-left:20px;color:#888"></div>
</div>
i need to get the innertext of the outer div with title contains some title.
i have this code
divs = docNode.SelectNodes("//div[contains(@title, 'View this search:')]")
If divs Is Nothing Then Continue For
For Each div In divs
If div Is Nothing Then Continue For
If ListSearch.Contains(div.InnerText) = False Then
ListSearch.Add(div.InnerText)
End If
Next
this gives me
34 New or Changed XThe value i need
instead of
The value i need
which is the text of the outer div.
Please offer any solution you have.
thanks
Try to use the following XPath: