Java XML QName Get getQName(Node node)

Here you can find the source of getQName(Node node)

Description

Gets the qualified name of a DOM node.

License

Apache License

Parameter

Parameter Description
node A DOM node.

Return

A QName representing a qualified name.

Declaration

public static QName getQName(Node node) 

Method Source Code

//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);
    }
}

Related

  1. getQName(Class klass)
  2. getQName(Element el)
  3. getQName(Element xml)
  4. getQName(final String name)
  5. getQName(Node n)
  6. getQName(Node node)
  7. getQName(Node node)
  8. getQName(QName qname)
  9. getQName(String configFilename, String serviceName, String namespaceURI, String tagName)