CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2009
    Posts
    17

    Wink 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

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    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
  •  





Click Here to Expand Forum to Full Width

Featured