resolveNamedElement method

T? resolveNamedElement(
  1. DOMElement? domParent,
  2. T? parent,
  3. DOMElement domElement,
  4. DOMTreeMap<T> treeMap,
)

Implementation

T? resolveNamedElement(DOMElement? domParent, T? parent,
    DOMElement domElement, DOMTreeMap<T> treeMap) {
  if (namedElementProvider == null) return null;

  var elementName = domElement.getAttributeValue(namedElementAttribute);

  if (elementName != null && elementName.isNotEmpty) {
    var element = namedElementProvider!(elementName, _domGenerator, treeMap,
        domParent, parent, domElement.tag, domElement.domAttributes);
    return element;
  } else {
    return null;
  }
}