RemoveElementChildren

Removes the child elements of the specified element corresponding to the specified tag.

Syntax

procedure RemoveElementChildren(aElement: TCSElement; aTagName: string = '');

Parameters

  • aElement
  • aTagName
    • type: string
    • function: tag of elements to delete

Notes

  • If aTagName is an empty string, it will be deleted all child elements.

Examples

  1. //loading the page google.ru with request
    LoadURI('https://www.google.ru/#newwindow=1&q=test+request');
    //Get the first element h3
    var element:=GetElement('h3', 0);
    //Remove the child links
    RemoveElementChildren(element,'a');