code: public static void requireNoContent(final XMLStreamReader reader) throws XMLStreamException {
          if (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
              throw unexpectedElement(reader);
          }
      }
docs: Consumes the remainder of the current element, throwing an
  {@link javax.xml.stream.XMLStreamException} if it contains any child
  elements.
  @param reader the reader
  @throws javax.xml.stream.XMLStreamException if an error occurs