[Overview][Procedures and functions] | Reference for unit 'HTMLUtil' (#powtils_main_html) |
Source position: htmlutil.pas line 15
(For example you want to preserve the url case on unix servers but hReF or HrEf or HREF or href you do not want to preserve. This function therefore is perfect for all case issues you might be worried about.)
The GetVal function even parses non-strict or sloppy html name value pairs with any sort of quotes or lack of quotes:
name=val, something='value', nAmE="other"
var s: string; begin s:= htmlutil.GetVal('<a href="http://url.com">link</a>', 'href'); writeln(s); s:= htmlutil.GetVal('<font color="red">text</font>', 'color'); writeln(s); end;Program outputs:
http://url.com red