Grabbing data (HTML) using MS XMLHTTP

Results 1 to 3 of 3

Thread: Grabbing data (HTML) using MS XMLHTTP

  1. #1
    parsem Guest

    Default Grabbing data (HTML) using MS XMLHTTP

    Please XML expert, help me on these two items...<BR><BR>1. I read the two articles (below) about grabbing HTML from a website. I can get a html page, but I can&#039;t seem to get parts of the HTML using regular expressions. Does anyone have a working example? Please help, cause it&#039;s really to hard for me to generate this kind of code. I need to get headlines from an html site, which are stored in &#060;a hrefs&#062; they all have one thing unique: in a &#060;a href&#062;, for example: &#060;a href="inhoud.asp?welke=802&wat=artikel"&#062; the "&wat=artikel" <BR><BR>2. When I grab a whole page, The links aren&#039;t working anymore, does anyone know how to fix this (put the full URL in the response code)<BR><BR><BR><BR><BR>Thanks so much for your time,<BR><BR>Parsem

  2. #2
    parsem Guest

    Default Here's the code i am trying to fix:

    &#060;%<BR> Response.Buffer = True<BR> Dim objXMLHTTP, xml<BR><BR> &#039; Create an xmlhttp object:<BR> Set xml = Server.CreateObject("Microsoft.XMLHTTP")<BR><BR> &#039; Opens the connection to the remote server.<BR> xml.Open "GET", "", False<BR> &#039; Actually Sends the request and returns the data:<BR> xml.Send<BR> <BR> Dim re, strHTML<BR> Set re = new RegExp &#039; creates the RegExp object<BR> re.IgnoreCase = true<BR> re.Global = False &#039; quits searching after first match<BR> re.Pattern = "&#060;a href.*(?=Artikel)" <BR> Set Matches = re.Execute(strHTML)<BR>For Each Item in Matches<BR>Response.Write Item.Value<BR>Next<BR>&#039; Show one specific piece<BR>Response.Write Matches.Item(0).Value<BR>&#039;capture remainder of the link<BR>re.Pattern = "&#060;a href.*(?=Artikel)(.&#124
    )*?&#060;/a&#062;"<BR>Set xml = Nothing<BR>%&#062;

  3. #3
    parsem Guest

    Default ANYONE?

    Can anyone please help me out a bit?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts