createXmlNameFromString function

XmlName createXmlNameFromString(
  1. String qualified
)

Create a XmlName by parsing the provided qualified name.

Implementation

XmlName createXmlNameFromString(String qualified) {
  final index = qualified.indexOf(XmlToken.namespace);
  if (index > 0) {
    final prefix = qualified.substring(0, index);
    final local = qualified.substring(index + 1);
    return XmlPrefixNameSyntheticImpl(prefix, local, qualified);
  } else {
    return XmlSimpleNameSyntheticImpl(qualified);
  }
}