Hi Team,
I'm trying to build a web application which is capable of scanning the HTML 
of a loaded web page for specific tags, embedded instructions, and XML data 
islands.

I started out with the Web Browser application sample that comes with 
Delphi, and found that it works fine as a way of _displaying_ HTML but is a 
bit lacking when it comes to accessing the document contents.

A quick look at the TWebBrowser help topic reveals:
        property Document: IDispatch;

and further investigation reveals the structure of IDispatch:
  {$EXTERNALSYM IDispatch }
  IDispatch = class(IUnknown)
  public
    function GetTypeInfoCount(var ctinfo: Integer): HResult; virtual; 
stdcall; abstract;
    function GetTypeInfo(itinfo: Integer; lcid: TLCID; var tinfo: 
ITypeInfo): HResult; virtual; stdcall; abstract;
    function GetIDsOfNames(const iid: TIID; rgszNames: POleStrList;
      cNames: Integer; lcid: TLCID; rgdispid: PDispIDList): HResult; 
virtual; stdcall; abstract;
    function Invoke(dispIDMember: TDispID; const iid: TIID; lcid: TLCID;
      flags: Word; var dispParams: TDispParams; varResult: PVariant;
      excepInfo: PExcepInfo; argErr: PInteger): HResult; virtual; stdcall; 
abstract;
  end;

but there are no examples of how you use this interface to get at the 
document contents.

The W3C DOM allows access to the document contents with a few lines of 
javascript:

   var docContents := document.getElementsByTagName("*");

and  docContents[0]  then returns the first tag in the HTML file.


Can anyone help ?

Regards,
Simon Mahony,
System Creator,
MetService.



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to