Here you can find the source of hasQName(Node node, QName qname)
Parameter | Description |
---|---|
node | the node |
qname | the qualified name |
public static boolean hasQName(Node node, QName qname)
//package com.java2s; import javax.xml.namespace.QName; import org.w3c.dom.Node; public class Main { /**//from ww w . j a v a2 s.co m * Determines if a node has a particular qualified name. * @param node the node * @param qname the qualified name * @return true if the node has the given qualified name, false if not */ public static boolean hasQName(Node node, QName qname) { return qname.getNamespaceURI().equals(node.getNamespaceURI()) && qname.getLocalPart().equals(node.getLocalName()); } }