Java tutorial
//package com.java2s; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; public class Main { public static int getNextEvent(XMLStreamReader xmlStreamReader) { Integer event = null; try { event = xmlStreamReader.next(); } catch (XMLStreamException e) { e.printStackTrace(); } return event; } }