i would like to ask someone how is possible to extract some informations from HTML document on network folder. and get them to memo, or text file.
the HTML file contains this informations:
<div>
<a name="N02CB3FB0N02CB7834"></a>
<table width="600" class="data">
<tr>
<td width="200" valign="middle" style="background-color:white;" rowspan="11"><a href="file://///SRVTOPS/TRUMPF_PDM2/DATA_LASER/Pellenc/Cierny/04_0/108536B.GEO"><img width="200" alt="108536B.GEO" src="file://///SRVTOPS/TRUMPF_PDM2/DATA_ORDER/JOBM3046/JOBM3046_1_108536B_1.BMP"></a></td><td valign="bottom">C. dílu:
</td><td valign="bottom">1
</td>
</tr>
<tr>
<td valign="bottom">Dil:
</td><td valign="bottom">108536B
</td>
</tr>
<tr>
<td valign="bottom">Název výkresu:
</td><td valign="bottom">PORTEUR
</td>
</tr>
<tr>
<td valign="bottom">Císlo zakázky:
</td><td valign="bottom">*</td>
</tr>
<tr>
<td valign="bottom">zakaznik</td><td valign="bottom">Pellenc</td>
</tr>
<tr>
<td valign="bottom">ks:
</td><td valign="bottom">9</td>
</tr>
<tr>
<td valign="bottom">Rozmer:
</td><td valign="bottom">850.0 mm
x
31.2 mm</td>
</tr>
<tr>
<td valign="bottom">Plocha:
</td><td valign="bottom">26107.27 mm2</td>
</tr>
<tr>
<td valign="bottom">Hmotnost:
</td><td valign="bottom">0.820 kg
</td>
</tr>
<tr>
<td valign="bottom">Trvani:
</td><td valign="bottom">00:
00:
31</td>
</tr>
<tr>
<td valign="bottom">Soubor dilu:
</td><td valign="bottom"><a href="file://///SRVTOPS/TRUMPF_PDM2/DATA_LASER/Pellenc/Cierny/04_0/108536B.GEO">108536B.GEO</a></td>
</tr>
</table>
</div>
<div>
<a name="N02CB3FB0N02CB7FA8"></a>
<table width="600" class="data">
<tr>
<td width="200" valign="middle" style="background-color:white;" rowspan="11"><a href="file://///SRVTOPS/TRUMPF_PDM2/DATA_LASER/VYTSTUHA_8KS.GEO"><img width="200" alt="VYTSTUHA_8KS.GEO" src="file://///SRVTOPS/TRUMPF_PDM2/DATA_ORDER/JOBM3046/JOBM3046_1_VYTSTUHA_8KS_2.BMP"></a></td><td valign="bottom">C. dílu:
</td><td valign="bottom">2
</td>
</tr>
<tr>
<td valign="bottom">Dil:
</td><td valign="bottom">NOID_2
</td>
</tr>
<tr>
<td valign="bottom">Název výkresu:
</td><td valign="bottom">
</td>
</tr>
<tr>
<td valign="bottom">Císlo zakázky:
</td><td valign="bottom">*</td>
</tr>
<tr>
<td valign="bottom">zakaznik</td><td valign="bottom"></td>
</tr>
<tr>
<td valign="bottom">ks:
</td><td valign="bottom">8</td>
</tr>
<tr>
<td valign="bottom">Rozmer:
</td><td valign="bottom">140.0 mm
x
48.8 mm</td>
</tr>
<tr>
<td valign="bottom">Plocha:
</td><td valign="bottom">4271.95 mm2</td>
</tr>
<tr>
<td valign="bottom">Hmotnost:
</td><td valign="bottom">0.134 kg
</td>
</tr>
<tr>
<td valign="bottom">Trvani:
</td><td valign="bottom">00:
00:
07</td>
</tr>
<tr>
<td valign="bottom">Soubor dilu:
</td><td valign="bottom"><a href="file://///SRVTOPS/TRUMPF_PDM2/DATA_LASER/VYTSTUHA_8KS.GEO">VYTSTUHA_8KS.GEO</a></td>
</tr>
</table>
<hr>
</di>
so for ressult i need. 108536, VYTSTUHA_8KS
and for each file i need to find a BMP file and put it to on image.
many thanks
Hello, sorry , yes i know how to read HTML file, and put it to memo, bu after I need to find some info. here is the code to get html to memo :
begin
if OpenDialog1.Execute then
begin
sHTMLFile := OpenDialog1.FileName;
Strl := TStringList.Create;
try
Strl.LoadFromFile(sHTMLFile);
Idoc := CreateComObject(Class_HTMLDOcument) as IHTMLDocument2;
try
IDoc.designMode := 'on';
while IDoc.readyState <> 'complete' do
Application.ProcessMessages;
v := VarArrayCreate([0, 0], VarVariant);
v[0] := Strl.Text;
IDoc.Write(PSafeArray(System.TVarData(v).VArray));
IDoc.designMode := 'off';
while IDoc.readyState <> 'complete' do
Application.ProcessMessages;
Memo1.Lines.Text := IDoc.body.innerText;
finally
IDoc := nil;
end;
finally
Strl.Free;
end;
end;
end;