Source Code : Build a QName from the element name
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Build a QName from the element name
import javax.xml.namespace.QName;
import org.w3c.dom.Element;
public class Utils {
/**
* Build a QName from the element name
* @param el
* @return
*/
public static QName getQName(Element el) {
if (el == null) {
return null;
} else if (el.getPrefix() != null) {
return new QName(el.getNamespaceURI(), el.getLocalName(), el.getPrefix());
} else {
return new QName(el.getNamespaceURI(), el.getLocalName());
}
}
}
Thank with us