THTMLTag component

Each THTMLTag component represents a HTML tag in Tags list after parsing. You can change their properties at run-time so you will be changing the HTML context in parsing component. Look at Tag components for information about supported tags.


Methods
constructor Create Creates a THTMLConstructor and initializes its data.
destructor Destroy Destroys component and its data.
procedure Add(FChild: THTMLTag) Adds a tag in Tags list
procedure Insert(FChild: THTMLTag; index: integer) Inserts a tag in Tags list at index position
procedure Remove(FChild: THTMLTag) Deletes a tag form Tags list
procedure Delete(index: integer) Deletes a tag form Tags list at index position
function FindTagByName(AName: string): THTMLTag Finds a tag in Tags list that contains Name=AName
procedure OpenTag Makes TagStyle=ts_OpeningTag
procedure CloseTag Makes TagStyle=ts_ClosingTag
function GetTagsCountByType(TagName: string): integer Indicates the number of entries in the Tags list that have TagName type
function GetItemsByType(index: integer; TagName: string): THTMLTag Finds a tag in the Tags list that have TagName type and at position=index
class function HTML2TXT(HTML: string): string Converts HTML special sequences into plain text


Properties
Content: string Represents the parsed contents of HTML file or string.
TagString: string Represents the unparsed contents of HTML string.
Tags: TList Lists the tags references
TagStyle: TTagStyle Represents style of the tag
InnerName: stringRepresents name of the tag
ParentTag: THTMLTag Indicates the parent of the tag
InnerText: string Represents the text inside block
ItemsCount: integer Indicates the number of entries in the Tags list that are in use
Items[index: integer]: THTMLTag Represents the Tags list as list of THTMLTags.
Items[index]=THTMLTag(Tags[index]).