Autor Beitrag
s4lzh3r1ng
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Fr 05.07.02 14:06 
Hallo,

kann man mit Delphi (Delphi 6) HTML-Tabellen, also "<table>" auslesen und in eine Delphi Tabelle einbauen ?

_________________
:wink: s4lzh3r1ng :wink:
*Dawson*
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Fr 05.07.02 15:23 
Hallöchen...

darüber hab ich auch schon mal nachgedacht... da es sich um eine Textdatei handelt könnte man die TAGS auslesen, die Position bestimmen und den Text auslesen...

ob es eine komfortablere Lösung gibt, kann ich nicht sagen... vieleicht über eine der HTML Komponenten...

Ist wenigstens ein Tipp...

Marcus

_________________
Wahrscheinlich geht es auch anderes,
aber anders ist ja nicht das selbe...
Marc
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 169

Win 2000, Win XP, SuSE Linux 8.2

BeitragVerfasst: Fr 05.07.02 16:36 
Hi s4lzh3r1ng,

ich denke auch das das kein großes Problem sein wird. Lese einfach Zeile für Zeile die HTML-Datei durch und parse nach den sechs folgenden TAG's:

<table> </table> <tr> </tr> <td> </td>

Es gibt natürlich noch weitere TAG's für den Bereich Tabellen, aber die o. g. sind wohl die am meisten benutzten.

Probleme wird es geben, wenn innerhalb einer Zelle ( <td> ) eine weitere Tabelle geöffnet wird.

Gruß Marc
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: Fr 05.07.02 17:06 
Die Sache mit den mehreren Tabellen geht auch.
Er muss nur von innen nach aussen arbeiten.
Also zuerst Start und Ende der Tabellen finden.
Die Tabelle in der Mitte auslesen, löschen, nächste, usw.

_________________
Keine Signatur ...
s4lzh3r1ng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Fr 05.07.02 17:13 
vielen Dank für eure Hilfe,

aber da gibt's noch nen kleines Problem:

"ich denke auch das das kein großes Problem sein wird. Lese einfach Zeile für Zeile die HTML-Datei durch und parse nach den sechs folgenden TAG's: "

wie geht das ?

Wäre schön, wenn ihr mir das noch sagen könntet . . .

_________________
:wink: s4lzh3r1ng :wink:
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: Fr 05.07.02 21:48 
Eiii ganz einfach:
Die Bedeutung von table = Tabelle, tr = Reihe und td = Spalte kennst du?

Die Seite in ein Memo laden.
Dann kannst du dieses der Reihe nach durcharbeiten:
ausblenden Quelltext
1:
2:
3:
4:
5:
var Z : Integer;
begin
for Z:= 0 to Memo.Lines.Count - 1 do
 .....
end;

Jetzt hast du die Zeilen. In diesen kannst du mit :
ausblenden Quelltext
1:
if Pos('<table>',Lowercase(Memo.Lines[Z])) > 0					

rausfinden ob ein entsprechender Tag vorhanden ist.

Der Rest ist Fleissarbeit :wink:

_________________
Keine Signatur ...
s4lzh3r1ng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 06.07.02 10:03 
Danke, ich werds mal versuchen . . .

_________________
:wink: s4lzh3r1ng :wink:
s4lzh3r1ng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 06.07.02 19:30 
Mann, mann,

in Delphi 4 waren die Internet-Komponentensammlung noch übersichtlich,
aber in Delphi 6 . . .
Mit welcher Komponente bekomme ich denn mit Delphi 6 den
Quelltext einer HTML-Seite :?:

_________________
:wink: s4lzh3r1ng :wink:
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: Sa 06.07.02 22:05 
imho

httpkompo.body

_________________
Keine Signatur ...
s4lzh3r1ng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: So 07.07.02 09:51 
ähm,

also ich glaube nicht das "httpkompo" ne Delphi6 Komponente ist
:D . Oder hast du die selber entwickelt . . . :?:

_________________
:wink: s4lzh3r1ng :wink:
Steffer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 299



BeitragVerfasst: So 07.07.02 11:44 
Nein habe ich nicht ...

Ich meinte eine x-beliebige HTTP-Kompo wie sie bei FastNet oder Indy dabei ist

_________________
Keine Signatur ...
s4lzh3r1ng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: So 07.07.02 12:49 
ahhhhhhhhhhhhhhhh . . . :idea:

Jetzt versteh' ich :wink: , Danke !

_________________
:wink: s4lzh3r1ng :wink: