Here you can find the source of getXmlQName(final NamespaceContext context, final String value)
public static QName getXmlQName(final NamespaceContext context, final String value)
//package com.java2s; //License from project: Apache License import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; public class Main { public static QName getXmlQName(final NamespaceContext context, final String value) { if (value == null) { return null; } else {/*from ww w . jav a 2 s. c o m*/ final int colonIndex = value.indexOf(':'); if (colonIndex == -1) { return new QName(value); } else { final String prefix = value.substring(0, colonIndex); final String name = value.substring(colonIndex + 1); final String namespaceUri = context.getNamespaceURI(prefix); return new QName(namespaceUri, name, prefix); } } } }