(a)
type
  TSAXContentHandler = class(TInterfacedObject, ISAXContentHandler)
  public
    function  putDocumentLocator(const pLocator: ISAXLocator):
                                 HResult; stdcall;
    function  startDocument: HResult; stdcall;
    ... other methods ...
  end;

(b)
var
  ContentHandler: TSAXContentHandler;
begin
  Contenthandler := TSAXContentHandler.Create;  

Example 2: TSAXContentHandler class. (a) The TSAXContentHandler class implements ISAXContentHandler. The IUnknown interface is implemented by TInterfacedObject; (b) Creating an instance of the TSAXContentHandler class.

Back to Article