Public Sub getStuffFromPage(ByVal page As HtmlDocument, ByVal basepage As String)
Dim theElementCollection As HtmlElementCollection = page.GetElementsByTagName("span")
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("id") = "rxPower" Then
Label1.Text = curElement.InnerText
End If
Next
End Sub
In the HTML document I am processing, I have the following...
<td class="meterCell" height="60"> Rx Power: <b><span id="rxPower">-48.3</span> dBm</b> </td>
If I place a breakpoint on line 6 (Label1.text = ...), It stops, and looking at curElement, I see:
curElement.Id = "rxPower" curElement.OuterHTML = "<SPAN id=rxPower></SPAN>" curElement.TagName = "SPAN"
but curElement.InnerText = Nothing.
Any ideas?
Edited to remove dead code I didn't notice.
This post has been edited by lar3ry: 03 October 2012 - 07:45 PM

New Topic/Question
Reply




MultiQuote




|