Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Parsing A List In A Webpage Help, Need Webpage Parsing Help
NotoriousZach
post Mar 20 2005, 11:52 PM
Post #1


Member [Level 1]
****

Group: Members
Posts: 55
Joined: 26-February 05
Member No.: 3,996



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. :)


This post has been edited by serverph: Mar 24 2005, 10:17 PM
Go to the top of the page
 
+Quote Post
Galahad
post Mar 21 2005, 10:06 PM
Post #2


Neurotical Squirrel
*********

Group: [HOSTED]
Posts: 590
Joined: 4-November 04
From: Novi Sad, Vojvodina
Member No.: 2,127



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Good Freeware List(6)
  2. List Of Free Games(10)
  3. Telemarketing Block List - Canada(1)
  4. Free Classified Ads--no Hype(6)
  5. A List Of Great Movies!(162)
  6. Creating A Shortcut List Near The System Tray(4)
  7. Password Protecting My Webpage(3)
  8. Data Structures -- Linked List(9)
  9. Data Structures -- Linked List -- Reverse(5)
  10. Create Dynamic Html/php Pages Using Simple Vb.net Code(1)
  11. Top 10 Geek Ways To Beat Boredom(12)
  12. Free Sms Site(5)
  13. Looking For A Free Rss Reader To Publish Feeds On My Webpage(1)
  14. Ameran Portals?(1)
  15. Using Unknown Fonts For Text In Webpage(5)
  1. Database Or Pdf(3)
  2. A List Of Animals And Their Meaning(1)
  3. Flash Media Into Html/css Website(1)
  4. Please Can You Review My Blog(3)
  5. Recommended List Of Money Making Sites(0)
  6. Arrays And List Boxes(2)
  7. 157 Of The Best Free Software On The Net(7)
  8. A List Of Awesome Free Fps'(29)
  9. Auto Webpage Resolution Format(7)
  10. List GMail Giveaway(58)
  11. How To Make An Ultimate Game List.(0)
  12. List Of Free Directories To Submit Your Websites(7)
  13. Can Anyone List Some Good Urls For Photoshop Brushes?(5)
  14. Posts To Mailing List Are Blocked(1)
  15. Program List(4)


 



- Lo-Fi Version Time is now: 11th October 2008 - 09:14 PM