Code example for QName

Methods: getLocalPartgetNamespaceURIgetPrefix

0
    } 
 
    protected String toString(Object name) {
        if (name instanceof QName) {
            QName qName = (QName) name;
            String prefix = qName.getPrefix();
            if (prefix == null || "".equals(prefix)) {
                prefix = qName.getNamespaceURI();
            } 
            if (prefix == null || "".equals(prefix)) {
                prefix = null;
            } 
 
            return prefix != null ? prefix + ":" + qName.getLocalPart() : qName.getLocalPart();
        } 
        else { 
            return name.toString();
        } 
          
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE