Using this link http://www.yellowpages.ca/search/?stype=si&what=sh&where=Ottawa,+ON&x=0&y=0 and telling HtmlAgilityPack to retrieve both address and place name at the same time ("//span[@class='listingTitle']|//div[@class='address']/text()[normalize-space(.)]"), I can get a list of placenames and addresses like this in a richtextbox:
- jh ryder machinery limited
- convenience storage ltd 3344 rideau
- rd, gloucester, on, k1g3n4
- kitchen interiors 146 colonnade rd,
- nepean, on, k2e7y1
The first line is bad, it doesnt have an address. Line 2 and 4 are good, they have addresses. So what I could do is:
Check each line,
if the following line doesnt contain "numbers + ON" then delete line.
This will leave me with PlaceNames followed by addresses, which I will then split every other line into a new textbox, (so I have one textbox with placenames, and another with addresses).
I hope I made myself clear.
-Dd,