code: public static boolean advanceReaderToNext(XMLStreamReader xsr, String tag)
        throws javax.xml.stream.XMLStreamException {
      if (tag == null) {
        throw new IllegalArgumentException("Tag name can't be null");
      }
      if (xsr == null) {
        throw new IllegalArgumentException("Stream Reader can't be null");
      }
      do {
        if (xsr.next() == javax.xml.stream.XMLStreamConstants.END_DOCUMENT) {
          return false;
        }
      } while (!(xsr.isStartElement() && xsr.getLocalName().equals(tag)));
  
      return true;
    }
docs: Advances the Stream Reader to the next occurrence of a user-specified tag.
  
  @param xsr The reader to advance.
  @param tag The tag to advance to. No brackets, just the name.
  @return True if advanced successfully, false when the end of document was successfully reached.
  @throws javax.xml.stream.XMLStreamException In all cases other than described by 'return'.