解决方法
试试这个:
uses ... Variants,MSHTML,ActiveX; var Cache: string; V: OleVariant; Doc: IHTMLDocument2; begin ... Cache := IdHTTP.Get(url); Doc := coHTMLDocument.Create as IHTMLDocument2; // create IHTMLDocument2 instance V := VarArrayCreate([0,0],varVariant); V[0] := Cache; Doc.Write(PSafeArray(TVarData(v).VArray)); // write data from IdHTTP // Work with Doc end;