selectFirst

fnNullable!XmlElement selectFirst(XmlElement root, string expression) @safe

Selects the first element matching an XPath-like expression under root.

Parameters

rootThe root element to search from.
expressionThe XPath-like query expression.

Returns

A Nullable!XmlElement containing the first matching element, or null if none match.