code: private boolean isEqualName(Node node1, Node node2) {
  
      if (!Objects.equals(node1.getNamespaceURI(), node2.getNamespaceURI())) {
        return false;
      }
      if (!Objects.equals(getLocalName(node1), getLocalName(node2))) {
        return false;
      }
      return true;
    }
docs: This method determines if the given nodes have the same {@link #getLocalName(Node) name} and
  {@link Node#getNamespaceURI() namespace}.
  
  @param node1 is the first node.
  @param node2 is the second node.
  @return {@code true} if both nodes have equal {@link #getLocalName(Node) name} and
  {@link Node#getNamespaceURI() namespace}.