[fpc-pascal] Fast HTML Parser

Andrew Haines andrewd207 at aol.com
Thu Aug 7 02:58:05 CEST 2014


On 08/06/14 13:50, Marcos Douglas wrote:
> Hi,
>
> Someone knows a fast html parser to use in Pascal code?
>
> I need something like this:
>
> HTML:
> <select name="sel_x">
> <option>1</option>
> <option>2</option>
> </select>
>
> I need a function/object to give me only the values:
> 1
> 2
>
> Something like:
> S := GetHTMLValues('sel_x');
>
> R

There is the unit fasthtmlparser included with fpc in the packages/chm
folder.

It is pretty basic and just has callbacks for tags and text. I don't
think it's smart enough to tell you of the

name="sel_x" part of your tag. Maybe it can be improved.

Regards,

Andrew Haines




More information about the fpc-pascal mailing list