Function getElementFromXPath

Retrieves the first element matching the given XPath expression.

  • Parameters

    • xpath: string

      The XPath expression to match the element(s).

    Returns null | Node

    • The first element that matches the XPath expression, or null if no match is found.