unable to load HTML from URL

Topics: Developer Forum, Project Management Forum, User Forum
Jan 3, 2010 at 3:56 PM
Edited Jan 3, 2010 at 4:29 PM

Hi,

I have started using the HAP and now I wanted to use this utility, which seems to have great power to parse the html. I'm stuck with following issue, I was just doing some sample and below are the issues I'm facing. 

1.  when I use this http://www.microsoft.com/ url and Search for the div tag . I'm able to retrieve the results in hrefs

2. When I user this http://www.jessops.com/online.store/products/75076/show.html url and search for the div tag. Its not at all loading the results. hrefs is always null. Can you please help me?

but both the above url have got the div..

// get the document from the Internet resource
            HtmlDocument doc = hw.Load(url);
            
// we remarked all articles have discriminant target="_new" attribute.
            
            HtmlNodeCollection hrefs = doc.DocumentNode.SelectNodes("//div[@id='prodcontainer']");
            
            if (hrefs == null)
{
return;
}

 

// get the document from the Internet resource

            HtmlDocument doc = hw.Load(url);

 

// we remarked all articles have discriminant target="_new" attribute.

 

            HtmlNodeCollection hrefs = doc.DocumentNode.SelectNodes("//div[@id='prodcontainer']");

 

            if (hrefs == null)

{

return;

}

 

Note: The above link I have used as sample.

Thanks ,

 

Novice