Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.xml.namespace.QName;

import org.w3c.dom.Node;

public class Main {
    /**
     * 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());
    }
}