findElement

inline fun <T : Element> Element.findElement(elementName: String? = null): T

Finds an element by its name and type. Can return the current element. If elementName is null, only the type is accounted for.

Throws

if there's no such element in the hierarchy.