Jul 24, 2008

Parsing A List In A Webpage Help - Need Webpage Parsing Help

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > VB Programming

free web hosting

Parsing A List In A Webpage Help - Need Webpage Parsing Help

NotoriousZach
Hey I want to parse a list in a webpage.......Im not too hot with parsing overall but I figured this would be the best place to ask for help.....

For example

if the HTML was

CODE

<tr>
<td>1</td><td><A target="_self" href=#><font color=#ff0000>Number1</font></a><td><font face=verdana size=2>IDNUMBER1</td>

<td><A target="_self" href=#><font color=#ff0000>Number2</font></a><td><font face=verdana size=2>61506</td><td><font face=verdana size=2>ID NUMER2</td>


If i wanted to parse that into a list box where it showed
Number ID
---------------
Number1 IDNUMBER1
Number2 IDNUMBER2


Hopefully you guys can make some sense of that....

CODE
note by serverph to NotoriousZach: code-tagged as needed. pls comply next time. :)

 

 

 


Reply

Galahad
Ok, from what I see without testing the code, I see you have 6 cells, in one row (I assume you accidentaly ommited </td> closing tags)... Now, since the columns you want, are defined in a same way, here is a sample code, that should work (I'll test it, and post back a VB code, if you want)

CODE

Index = 0
Position = InStr(0,"<td><font face=verdana size=2>")
While Position > 0
 Position = Position + Len("<td><font face=verdana size=2>")
 ClosingTag = InStr(Position,"</td>")
 Columns(Index) = Mid(HTML, Position, ClosingTag - Position)
 Index = Index + 1
 Position = InStr(Position,"<td><font face=verdana size=2>")
Wend


You then just need to go through the Columns array, and get the items you need, using some filter...

NOTE: I did not test this code, I wrote it straight from the head, but it should give you some idea what to do. Send me an email if you need further help

Hope this helped some smile.gif

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : parsing webpage webpage parsing

  1. [tutorial] Visual Basic 6 Downloading Images From A Webpage - Downloading Images from a webpage (2)
  2. Parsing - (5)
    Can anyone explain how to parse a webpage using VB.... Ive never done it so im not familiar....



Looking for parsing, list, webpage, webpage, parsing

Searching Video's for parsing, list, webpage, webpage, parsing
advertisement



Parsing A List In A Webpage Help - Need Webpage Parsing Help



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE