[yunqa.de] Re: Parsing HTML-Tags detect HTML-Tags wrong

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Thu, 06 Mar 2008 10:31:12 +0100

Simon Schaeberle wrote:

>we Parse a WideString to find same HTML-Tags. The Tags where found, but in the 
>TDIHtmlTag-Class is the TagID always 0 even when a HTML-Tag is detected an the 
>TagName is for example br.
>
>How must we handle this.

You need to register the HTML tags and attributes so that TDIHtmlParser can 
resolve the tag and attrib strings to their IDs. The relevant calls are

  RegisterHtmlTags;
  RegisterHtmlAttribs;

If you want standard HTML entities to resolve automatically, you may also call

  RegisterHtmlDecodingEntities;

Your application needs to call these functions only once, but before the first 
parsing. It therefore makes sense to put these calls into the initialization 
section of your main parsing unit.

More details available in the DIHtmlParser Help:

  HtmlParser Overview -> Tag and Attribute IDs

Ralf 

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: