createXmlNameNaturalFromString function

XmlNameNatural createXmlNameNaturalFromString(
  1. XmlSourceRange range,
  2. String qualified
)

Create a XmlName by parsing the provided qualified name.

Implementation

XmlNameNatural createXmlNameNaturalFromString(XmlSourceRange range, String qualified) {
  final index = qualified.indexOf(XmlToken.namespace);
  if (index > 0) {
    final prefix = qualified.substring(0, index);
    final local = qualified.substring(index + 1);
    return XmlPrefixNameNaturalImpl(range, prefix, local, qualified);
  } else {
    return XmlSimpleNameNaturalImpl(range, qualified);
  }
}