getAttributeNode method

  1. @override
XmlAttribute? getAttributeNode(
  1. String name, {
  2. String? namespace,
})

Return the attribute node with the given name, or null.

Implementation

@override
XmlAttribute? getAttributeNode(String name, {String? namespace}) {
  final tester = createNameMatcher(name, namespace);
  for (final attribute in attributes) {
    if (tester(attribute)) {
      return attribute;
    }
  }
  return null;
}