code: boolean isPrefixMappedToUri(String prefix, String uri) {
          if (prefix == null) {
              return false;
          }
  
          String actual = lookupNamespaceURI(prefix);
          return uri.equals(actual);
      }
docs: Returns true if the given prefix is mapped to the given URI on this
  element. Since child elements can redefine prefixes, this check is
  necessary: {@code
  <foo xmlns:a="http://good">
  <bar xmlns:a="http://evil">
  <a:baz />
  </bar>
  </foo>}
  
  @param prefix the prefix to find. Nullable.
  @param uri the URI to match. Non-null.