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