createXmlName function

XmlName createXmlName(
  1. String local, [
  2. String? prefix
])

Creates a qualified XmlName from a local name and an optional prefix.

Implementation

XmlName createXmlName(String local, [String? prefix]) {
  if (prefix == null || prefix.isEmpty) {
    return XmlSimpleNameSyntheticImpl(local);
  } else {
    return XmlPrefixNameSyntheticImpl(prefix, local, '$prefix${XmlToken.namespace}$local');
  }
}