findAllElements method
Iterable<XmlElement>
findAllElements(
- String name, {
- String? namespaceUri,
- @Deprecated('Use `namespaceUri` instead') String? namespace,
Returns a lazy Iterable of the recursive child elements in document
order with the specified tag name and namespaceUri.
Both name and namespaceUri can be a specific String; or '*' to
match anything. If no namespaceUri is provided, the fully qualified
name is compared; otherwise only the local name is considered.
For example:
document.findAllElements('xsd:name')finds all elements with the fully qualified tag namexsd:name.document.findAllElements('name', namespaceUri: '*')finds all elements with the local tag namenameno matter their namespace.document.findAllElements('*', namespaceUri: 'http://www.w3.org/2001/XMLSchema')finds all elements with the given namespace URI.
Implementation
Iterable<XmlElement> findAllElements(
String name, {
String? namespaceUri,
@Deprecated('Use `namespaceUri` instead') String? namespace,
}) => _filterElements(
descendants,
name,
namespaceUri: namespaceUri ?? namespace,
);