code: public QName toQName(String qname){
          String prefix = "";
          String localName = qname;
  
          int colon = qname.indexOf(':');
          if(colon!=-1){
              prefix = qname.substring(0, colon);
              localName = qname.substring(colon+1);
          }
          String ns = getNamespaceURI(prefix);
          if(ns==null)
              throw new IllegalArgumentException("undeclared prefix: "+prefix);
  
          return new QName(ns, localName, prefix);
      }
docs: Constructs {@link javax.xml.namespace.QName} for the specified {@code qname}.
  
  @param qname the qualified name
  @return {@link javax.xml.namespace.QName} object constructed.
  
  @throws IllegalArgumentException if the prefix in {@code qname} is undeclared.