|
-
February 18th, 2010, 05:30 PM
#1
searching for mailto link
hello everyone!
I need to open a web page and search for every <a href="mailto:....
that appears there,copy them to DB
Anyone could help it'd be very appreciative
Thanks
-
February 19th, 2010, 04:30 AM
#2
Re: searching for mailto link
1. Use the HttpWebRequest to request for the page and get the response. Check out MSDN
2. Use the response stream to create an XmlDocument. This assumes the web page conforms to XHTML standards otherwise it wont work.
3. Use XPATH to query for 'a' elements with the 'href' attribute. It will give you the data in a node list which can be iterated through and you can use standard ADO.NET to save the data in the database.
If you can't rely on step two then you'll have to search through the data for those tags.
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
|