getNthChild method
Returns the nth direct child named elementName
.
index
must not be null
and must be >= 0
.
Returns null
if no element can be found.
Implementation
XmlElement? getNthChild(int index, String elementName) {
assert(index >= 0);
assert(elementName.isNotEmpty);
return getChildren(elementName, start: index, stop: index)?.first;
}