code: public static void requireNamespace(final XMLExtendedStreamReader reader, final Namespace requiredNs) throws XMLStreamException {
          Namespace actualNs = Namespace.forUri(reader.getNamespaceURI());
          if (actualNs != requiredNs) {
              throw unexpectedElement(reader);
          }
      }
docs: Require that the namespace of the current element matches the required namespace.
  
  @param reader the reader
  @param requiredNs the namespace required
  @throws XMLStreamException if the current namespace does not match the required namespace