But I was referring to the HTTPApp functions algorithm, not the functions
itself. Allocating the maximum possible result string length at the
beginning, and using pointers, is usually more efficient than all these copy
and concatenation operations you are using in your code.
I know, and I
Ok, I took your example and created a (I suppose) complete encode-decode
unit.
Daniele
*
unit XmlParserUnit;
interface
uses StrUtils, SysUtils;
const
XmlNames : Array[1..240] of String = ('quot;',
If this is HTML related, why you use XML in the names?!
Why not use the faster, and memory efficient, HTTPApp.pas code methods?
Ok, I took your example and created a (I suppose) complete encode-decode
unit.
Daniele
--
To unsubscribe or change your settings for TWSocket mailing list
please
The Xml names are there because I started from the example posted by Anton
and I didn't want to create confusion with the existing
HTMLEncode/HTMLDecode function already existing.
Anyway I never though names would be a problem in a non official unit...
The HTTPApp-HTMLDecode function only works
Delphi HTTPApp unit, function HTMLDecode
Wow! I had no idea of this unit, Thanks a lot! HTTP date parsing, Cookies (!),
entuity en/decoding... THttpCli might take some useful code from this unit :)
But as I see, HTMLEncode touches only special chars. If that's what you need,
fine. You may also
You may also use my function which I wrote for a XML:
Ahh, sorry, you need decoding... here's algorythm:
1) Search for
2) Search for ; after
3) Get text between and ; as S
4) idx := AnsiIndexStr(S, XmlEntities);
if idx = -1 then ... // Error or ignore
5) replacement char is
Hi all,
I need to convert text that uses special HTML encoding such as amp; or
nbsp; to their corresponding charachter.
Do any of you know if such function exists?
'Cause at the moment I'm thinking of writing it myself but it's gonna take
quite a while...
Daniele
--
To unsubscribe or change
Delphi HTTPApp unit, function HTMLDecode
Hi all,
I need to convert text that uses special HTML encoding such as amp; or
nbsp; to their corresponding charachter.
Do any of you know if such function exists?
'Cause at the moment I'm thinking of writing it myself but it's gonna take
quite a
Yes, that's what I found on the internet, but then I couldn't find any
reference in the Delphi help file.
I'll look better, thanks.
Daniele
On 20 April 2011 16:50, RTT p...@sapo.pt wrote:
Delphi HTTPApp unit, function HTMLDecode
Hi all,
I need to convert text that uses special HTML