trichview.support.thirdparty
rvhtmlimporter, addition of meta-tags |
Author |
Message |
Stef Mientki |
Posted: 04/19/2005 23:43:54 hello, I've added importing of meta-tags (like Author, etc). It's very handy too for storing meta data like: last scroll position. ---- example ----------- <meta name="CaretPos" content="2" /> <meta name="VScrollPos" content="0" /> -------------------------------- After importing the html, you can access these meta tags simply by ------------------------------ line:=RvHtmlImporter1.meta_tags.Values['VScrollPos']; ------------------------------ Stef Mientki 1. To the public part of htmlimporter, add a stringlist -------------------------- meta_tags :tstringlist; ---------------------------- 2. In the create of the parser, also create the stringlist --------------------------- meta_tags:=tstringlist.create; --------------------------- 3. In the parser, after 'title' detection if (s = 'title') then begin end ----- insert ------------------------- else if (s = 'meta') then begin s := gv(Parser.TagParams, 'name'); if s<>'' then meta_tags.Add(s+'='+gv(Parser.TagParams, 'content')); Parser.LastWasSpace := True; end |
Powered by ABC Amber Outlook Express Converter