Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import javax.xml.namespace.QName;

import org.w3c.dom.Node;

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