J
jdrott1
I'm trying to get the table data from a website. i found this snippet
of code online to pull the meta info. how can i change this to pull
all the table info?
'reads the html into an html document to enable parsing
Dim doc As IHTMLDocument2 = New HTMLDocumentClass()
doc.write(New Object() {responseFromServer})
doc.close()
'loops through each element in the document to check if it
qualifies for the attributes to be set
For Each el As IHTMLElement In DirectCast(doc.all,
IHTMLElementCollection)
' check to see if all the desired attributes were found
with the correct values
Dim qualify As Boolean = True
If el.tagName = "tr" Then
Dim meta As HTMLMetaElement = DirectCast(el,
HTMLMetaElement)
Response.Write("Content " + meta.content & "<br/>")
End If
Next
of code online to pull the meta info. how can i change this to pull
all the table info?
'reads the html into an html document to enable parsing
Dim doc As IHTMLDocument2 = New HTMLDocumentClass()
doc.write(New Object() {responseFromServer})
doc.close()
'loops through each element in the document to check if it
qualifies for the attributes to be set
For Each el As IHTMLElement In DirectCast(doc.all,
IHTMLElementCollection)
' check to see if all the desired attributes were found
with the correct values
Dim qualify As Boolean = True
If el.tagName = "tr" Then
Dim meta As HTMLMetaElement = DirectCast(el,
HTMLMetaElement)
Response.Write("Content " + meta.content & "<br/>")
End If
Next