|
델파이 소스
procedure TForm1.Button1Click(Sender: TObject);
var
doc: OleVariant;
el: OleVariant;
i: Integer;
begin
doc := coHTMLDocument.Create as IHTMLDocument2;
doc.write([HTML 소스]);
doc.close;
ShowMessage(doc.body.innerHTML);
for i := 0 to doc.body.all.length - 1 do
begin
el := doc.body.all.item(i);
if (el.tagName = 'LABEL') and (el.className = 'tvLabel') then
ShowMessage(el.innerText);
if (el.tagName = 'SPAN') and (el.className = 'tvValue') then
ShowMessage(el.innerText);
end;
end;
c++ 빌더 소스
void __fastcall TForm5::Button1Click(TObject *Sender)
{
IHTMLDocument2 doc =
}
html을 파싱하는 소스입니다.
하.. 내용이 doc에 html소스를 넣어서 어찌어찌 하는 것 같은데 델파이로 되어 있어서 알 수가 없네요.
능력자 분 부탁드립니다.
|