code: private static Element nextElement(XMLExtendedStreamReader reader, String expectedNamespace) throws XMLStreamException {
          Element element = Element.forName(reader.getLocalName());
  
          if (element == null) {
              return element;
          } else if (expectedNamespace.equals(reader.getNamespaceURI())) {
              return element;
          }
  
          throw unexpectedElement(reader);
      }
docs: A variation of nextElement that verifies the nextElement is not in a different namespace.
  
  @param reader            the XmlExtendedReader to read from.
  @param expectedNamespace the namespace expected.
  @return the element or null if the end is reached
  @throws XMLStreamException if the namespace is wrong or there is a problem accessing the reader