Java XML QName matches(QName qname, Node node)

Here you can find the source of matches(QName qname, Node node)

Description

matches

License

Open Source License

Declaration

public static boolean matches(QName qname, Node node) 

Method Source Code

//package com.java2s;
import javax.xml.namespace.*;
import org.w3c.dom.*;

public class Main {
    public static boolean matches(QName qname, Node node) {
        return (node != null && qname.equals(newQName(node)));
    }//from ww w  . j a  v a2s  .  c o  m

    public static QName newQName(Node node) {
        if (node != null) {
            return new QName(node.getNamespaceURI(), node.getLocalName());
        } else {
            return new QName(null, null);
        }
    }
}

Related

  1. marshal(T value, Class elementClass, String packageName, QName q_name, OutputStream oStream)
  2. marshallJAXBElement(Class declaredType, QName name, Class scope, BoundType v)
  3. marshalToString(T obj, Class clazz, QName qname)
  4. match(XMLStreamReader reader, QName name)
  5. matches(Node node, String requiredLocalName, QName requiredNamespace)
  6. matchingNamespace(Node node, QName requiredNamespace)
  7. matchNode(Node node, QName name)
  8. moveReaderToTag(XMLStreamReader reader, QName... tags)
  9. namedNode(QName qname)