getElement method
Recursively checks all elements within this node tree and
returns the first element found named elementName
.
Returns null
if no element can be found named elementName
.
Implementation
XmlElement? getElement(String elementName) {
assert(elementName.isNotEmpty);
return getElementsWhere(
name: elementName,
start: 0,
stop: 0,
)?.first;
}