findElements method
Return a lazy Iterable of the direct child elements in document
order with the specified tag name
and namespace
.
Both name
and namespace
can be set to a specific String or '*'
to
match anything. If no namespace
is provided, the fully qualified name
will be matched, otherwise only the local name is compared.
For example:
element.findElements('xsd:annotation')
finds all direct child elements with the fully qualified tag namexsd:annotation
.element.findElements('annotation', namespace: '*')
finds all direct child elements with the local tag nameannotation
no matter their namespace.element.findElements('*', namespace: 'http://www.w3.org/2001/XMLSchema')
finds all direct child elements within the provided namespace URI.
Implementation
@override
Iterable<XmlElement> findElements(String name, {String? namespace}) =>
filterElements(children, name, namespace);