HTML code is not necessary organized into texte lines acceptable by a
StringList (that is lines with CR/LF pair). For example many server do send
HTML as a huge single line, or send unix type lines (LF only).

In my opinion, it's not a good idea to parse HTML using a StringList. You'd
better use a simple PChar to scan the HTML, or if you don't like pointers,
use une index.

The fastest way involve using a TMemoryStream to receive the HTML document
and then a a PChar you intialize on MyMemoryStream.Memory and directly scan
the received data without further moving it. You have the size in
MyMemoryStream.Size.

btw: This is much of a Delphi programming problem than an ICS component
issue.

--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "rogersmail" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Sunday, May 15, 2005 12:46 PM
Subject: [twsocket] HttpCli parsing incoming html


> I am using the HttpCli component to post() a request to a php script which
> inturn returns an html type title,description etc into my DataIn stream ,
> however i have had problems getting the html description into a single
> String, i have used the StringList->LoadFromStream(DataIn) to put each
> record into a seperate Strings[x] etc but the html in the descriptions
> spills over into more than one String[x] in the StringList...any ideas.
>
>
>
>
> ----- Original Message -----
> From: "Francois PIETTE" <[EMAIL PROTECTED]>
> To: <twsocket@elists.org>
> Sent: Sunday, May 15, 2005 9:10 AM
> Subject: [twsocket] Delphi Survey 2005
>
>
> > Borland is currently conducing a survey about Delphi :
> > http://infopoll.net/live/surveys/s27784.htm
> > Would be helpful for ICS to mention it into question 1.18:
> >            "1.18 Which Delphi Web or Internet technologies do you
> >              already use or plan to use in the next 24 months?"
> > Select Other and enter ICS.
> >
> > --
> > [EMAIL PROTECTED]
> > http://www.overbyte.be
> >
> >
> > --
> > To unsubscribe or change your settings for TWSocket mailing list
> > please goto http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be
> >
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to