has static method

bool has({
  1. required XmlElement node,
  2. required String tag,
})

Gets the value of a attribute else a child element

Implementation

static bool has({required XmlElement node, required String tag}) {
  try {
    if (hasAttribute(node: node, tag: tag)) return true;
    if (hasElement(node: node, tag: tag)) return true;
  } catch (e) {
    Log().exception(e,
        caller: 'xml.dart => String get({XmlElement node, String tag})');
  }
  return false;
}