1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24:
| function CleanData(AText: String): String; begin Result := AText; while Pos('<', Result) > 0 do Delete(Result, Pos('<', Result), Pos('>', Result) - Pos('<', Result) + 1); end;
function GetNextData(var AText, AName, AValue: String): Boolean; begin Result := False; if Pos('<td', AText) = 0 then Exit; Delete(AText, 1, Pos('<td', AText) + 2); Delete(AText, 1, Pos('>', AText)); if Pos('<td', AText) = 0 then Exit; AName := CleanData(Copy(AText, 1, Pos('</td>', AText) - 1)); Delete(AText, 1, Pos('<td', AText) + 2); Delete(AText, 1, Pos('>', AText)); AValue := CleanData(Copy(AText, 1, Pos('</td>', AText) - 1)); Result := True; end; |