Here you can find the source of getQName(Node node)
Parameter | Description |
---|---|
node | A DOM node. |
public static QName getQName(Node node)
//package com.java2s; //License from project: Apache License import javax.xml.namespace.QName; import org.w3c.dom.Node; public class Main { /**/*from w w w .j a va 2s.c o m*/ * Gets the qualified name of a DOM node. * * @param node * A DOM node. * @return A QName representing a qualified name. */ public static QName getQName(Node node) { String localName = (null == node.getLocalName()) ? "" : node.getLocalName(); return new QName(node.getNamespaceURI(), localName); } }