记得 MSDN里面有个 
IHTMLTable接口
但是不知道 这个接口怎么得到!
譬如
http://www.texnet.com.cn/news/n01/
想要这个URL里面的国内新闻的50个链接
怎样最方便呢?
请大侠们指点!

解决方案 »

  1.   

    IHTMLDocument3::getElementsByTagName("TABLE",&pHTMLElementCollection)
      

  2.   

    兄台,怎么得到IHTMLDocument3的指针呢?
      

  3.   

    CComPtr<IHTMLDocument3> pDoc3;
    hr = pDoc2->QueryInterface(IID_IHTMLDocument3,(void**)&pDoc3) ;不过VC6要在MS网站更新SDK,或用VC7以上开发.
      

  4.   

    兄台 不知怎么回事
    BOOL CGutiBrowserView::GetTableUrl()
    {

    IHTMLDocument2* pDoc2 = NULL;
    IHTMLElementCollection* pAllElem = NULL;
    CString s_TagName = _T("table");
    CComBSTR bs_TagName;
    HRESULT hr;
    pDoc2 = (IHTMLDocument2*)GetHtmlDocument();
    CComPtr<IHTMLDocument3> pDoc3;
    ASSERT(pDoc2);
    if (pDoc2 != NULL)
    {

    hr = pDoc2->QueryInterface(IID_IHTMLDocument3,(void**)&pDoc3);
    ASSERT(pDoc3);
    if (pDoc3 != NULL)
    {
    bs_TagName = s_TagName;
    pDoc3->getElementsByTagName(bs_TagName,&pAllElem);
    }
    }
             return TRUE;}
    编译的时候报“error LNK2001: unresolved external symbol _IID_IHTMLDocument3”
    的错误
    头痛啊。
    请兄台帮我看看啊