Here you can find the source of getKey(QName name)
public static String getKey(QName name)
//package com.java2s; //License from project: Open Source License import javax.xml.XMLConstants; import javax.xml.namespace.QName; public class Main { public static String getKey(QName name) { if (name == null) { return null; }/*ww w. java 2 s. co m*/ final StringBuilder sb = new StringBuilder(); final String namespaceURI = name.getNamespaceURI(); if (!namespaceURI.equals(XMLConstants.NULL_NS_URI)) { sb.append("{").append(namespaceURI).append("}"); } final String prefix = name.getPrefix(); if (!XMLConstants.DEFAULT_NS_PREFIX.equals(prefix)) { sb.append(prefix).append(":"); } final String localPart = name.getLocalPart(); sb.append(localPart); return sb.toString(); } }