XardozCom
Member
This was covered in this thread, but somehow I just don't get it...
I am trying to get the results from a WEB page HTML
No matter how I parse it, I do not get the results I want
Attached is the HTML, I am wanting the address information after this tag <p class="std-address">.
Here are the actual tags I need.
I am trying to get the results from a WEB page HTML
No matter how I parse it, I do not get the results I want
VB.NET:
Private Sub GetSiteInformation()
For Each currentDiv_Element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("span")
Debug.Print(currentDiv_Element.GetAttribute("span").ToString)
If currentDiv_Element.GetAttribute("span") = "std-address" Then
For Each currentSpan_Element As HtmlElement In currentDiv_Element.GetElementsByTagName("span")
If currentSpan_Element.GetAttribute("span") = "address1 range" Then
txtSiteAddress.Text = currentSpan_Element.InnerText
End If
Next
For Each price_Element As HtmlElement In currentDiv_Element.GetElementsByTagName("div")
If price_Element.GetAttribute("className") = "city" Then
txtSiteCity.Text = price_Element.InnerText
End If
Next
End If
Next
End Sub
Attached is the HTML, I am wanting the address information after this tag <p class="std-address">.
Here are the actual tags I need.
VB.NET:
<span class="address1 range">22805 60TH AVE W</span>
<span class="city range">MOUNTLAKE TERRACE </span>
<span class="state range">WA</span>
<span class="zip" style="">98043</span>
<span class="zip4">3715</span>
<dt>County</dt>
<dd>SNOHOMISH </dd>