HF RL Explorer

Task: XPath to Return Only Leaf Elements Containing Specific Text

Task: XPath to Return Only Leaf Elements Containing Specific Text: a task in Terminal-Lego-15k (Harbor dataset). When using XPath to search for elements containing specific text, expressions like // contains(., 'match') will match not only the element directly containing the text, but also all of…

The task

When using XPath to search for elements containing specific text, expressions like `//*[contains(., 'match')]` will match not only the element directly containing the text, but also all of its ancestor elements (since the string value of a parent element includes all descendant text). Your task is to write an XPath…

Part of PrimeIntellect/Terminal-Lego-15k.