大家好,我正在重新制定问题,我得到一个带有 tidhttp 的 html,并以这种方式在 TWebBrowser 中工作这个 html:
(WebBrowser.Document as IHTMLDocument2).body.innerHTML := xHtml;
ovTable := WBT.OleObject.Document.all.tags('TABLE').item(1);
其中 ovTable 是 OleVariant;
我想在不必使用 TWebBrowser 的情况下做同样的事情,因为它在创建时会消耗大量内存,我正在尝试这个:
Idoc := CreateComObject(Class_HTMLDOcument) as IHTMLDocument2;
try
IDoc.designMode := 'on';
while IDoc.readyState <> 'complete' do
Application.ProcessMessages;
v := VarArrayCreate([0, 0], VarVariant);
v[0] := xHtml;
IDoc.Write(PSafeArray(System.TVarData(v).VArray));
IDoc.designMode := 'off';
finally
IDoc := nil;
end;
现在,如何使用 IDoc 从表中获取数据?
ovTable := Idoc.??
谢谢!