RemoveElementsChildren

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

Syntax

procedure RemoveElementsChildren(aElements: TCSElements; aTagName: string = '');

Parameters

  • aElements
    • functions: target array of elements
  • aTagName
    • type: string
    • functions: tag of elements to delete

Notes

  • If aTagName is an empty string, it will be deleted child elements that match any tag.

Examples

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