-
May 1st, 2006, 03:24 PM
#1
Thread Starter
Frenzied Member
How to extract multiple values from html pattern?
Hi all i am using inet1.openURL to output the html code into textbox using code at the button .What i want scan the whole html in the textbox and look for the bold parts below and add them to listview. I be happy if some one show me how i can grab those two data shown in bold.Thanks
<tr>
<td align="center" scope="row">1</td>
<td align="center"><INPUT TYPE="Checkbox" NAME="song_id" ONCLICK="reviewSelection();" VALUE="2206"></td>
<td><a href="#" class="song_title" onclick="loadPlayer('2206');return false;">song title
</a> </td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
code to get html in textbox:
VB Code:
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0:
If txtURL.Text <> "" Then
RichTextBox1.Text = Inet1.OpenURL(txtURL.Text, icString)
End If
Case 1:
End
End Select
End Sub
-
May 1st, 2006, 03:35 PM
#2
Re: How to extract multiple values from html pattern?
u would have an easier time using the webbrowser control with HTML Object reference
VB Code:
Dim HTMLA As HTMLAnchorElement
Dim HTML As HTMLDocument
Set HTML = webbrowser1.Document
For Each HTMLA In HTML.links
If InStr(HTMLA.onclick, "loadPlayer") Then
tmp = HTMLA.onclick
tmp = Replace(tmp, "loadPlayer('", "")
tmp = Replace(tmp, "');return false;", "")
MsgBox tmp & " - " & HTMLA.innerText
End If
Next
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
May 1st, 2006, 03:50 PM
#3
Thread Starter
Frenzied Member
Re: How to extract multiple values from html pattern?
static could u tell me where should i put this ? i mean in what event ?Furthermore , could u explain to me if i need any controles or refrences or coponents to run it.
Also could u tell me what u mean by using the webbrowser control ? i am doing lot of pattern search thing simmer to this so i need to learn easy way too. Furthermore, i do not see your code make any connection to listview ? could u show me how to output the matches to listview so i can manipulate them later.Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|