Java XML QName namedNode(QName qname)

Here you can find the source of namedNode(QName qname)

Description

named Node

License

Apache License

Declaration

public static Predicate<? super Node> namedNode(QName qname) 

Method Source Code

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

import java.util.Objects;
import java.util.function.Predicate;

import javax.annotation.Nullable;
import javax.xml.namespace.QName;

import org.w3c.dom.Node;

public class Main {
    public static Predicate<? super Node> namedNode(QName qname) {
        return namedNode(qname.getNamespaceURI(), qname.getLocalPart());
    }//from ww w .  j a v a  2  s  . c  o m

    public static Predicate<? super Node> namedNode(@Nullable String nsUri, String localName) {
        return node -> (Objects.equals(node.getNamespaceURI(), nsUri) && node.getLocalName().equals(localName));
    }
}

Related

  1. matches(Node node, String requiredLocalName, QName requiredNamespace)
  2. matches(QName qname, Node node)
  3. matchingNamespace(Node node, QName requiredNamespace)
  4. matchNode(Node node, QName name)
  5. moveReaderToTag(XMLStreamReader reader, QName... tags)
  6. nodeToQName(Node node)
  7. parseXml(final Node node, final Map properties)
  8. printPath(List path)
  9. read(Node node, String expression, QName returnType)