/** * This is used to read the next node from the document. This will * scan through the document, ignoring any comments to find the * next relevant XML event to acquire. Typically events will be * the start and end of an element, as well as any text nodes. * * @return this returns the next event taken from the document */ private EventNode read() throws Exception { int event = parser.next(); if(event != END_DOCUMENT) { if(event == START_TAG){ return start(); } if(event == TEXT) { return text(); } if(event == END_TAG) { return end(); } return read(); } return null; }
/** * This is used to read the next node from the document. This will * scan through the document, ignoring any comments to find the * next relevant XML event to acquire. Typically events will be * the start and end of an element, as well as any text nodes. * * @return this returns the next event taken from the document */ private EventNode read() throws Exception { int event = parser.next(); if(event != END_DOCUMENT) { if(event == START_TAG){ return start(); } if(event == TEXT) { return text(); } if(event == END_TAG) { return end(); } return read(); } return null; }
/** * This is used to read the next node from the document. This will * scan through the document, ignoring any comments to find the * next relevant XML event to acquire. Typically events will be * the start and end of an element, as well as any text nodes. * * @return this returns the next event taken from the document */ private EventNode read() throws Exception { int event = parser.next(); if(event != END_DOCUMENT) { if(event == START_TAG){ return start(); } if(event == TEXT) { return text(); } if(event == END_TAG) { return end(); } return read(); } return null; }