findTags method

List<XMLNode> findTags(
  1. String tag,
  2. {String? xmlns}
)

Returns all children whose tag is equal to tag.

Implementation

List<XMLNode> findTags(String tag, {String? xmlns}) {
  return children.where((element) {
    final xmlnsMatches =
        xmlns != null ? element.attributes['xmlns'] == xmlns : true;
    return element.tag == tag && xmlnsMatches;
  }).toList();
}