Here you can find the source of getQualifiedName(QName qName)
Parameter | Description |
---|---|
qName | The QName. |
public static String getQualifiedName(QName qName)
//package com.java2s; //License from project: Open Source License import javax.xml.XMLConstants; import javax.xml.namespace.QName; public class Main { /**/*from w w w . j ava2 s . c o m*/ * Return the qualified name, that is to say the prefix -if any- with the * local name. * * @param qName * The QName. * @return A string that looks like "<tt>prefix:localName</tt>" or " * <tt>NCName</tt>". */ public static String getQualifiedName(QName qName) { if (!XMLConstants.NULL_NS_URI.equals(qName.getNamespaceURI()) && !XMLConstants.DEFAULT_NS_PREFIX.equals(qName.getPrefix())) { return qName.getPrefix() + ":" + qName.getLocalPart(); } else { return qName.getLocalPart(); } } }