int event = fastInfosetStreamReader.getEventType(); if(event == XMLStreamConstants.START_DOCUMENT) {
CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); int eventType = getEventType(); StringBuilder content = new StringBuilder(); while(eventType != END_ELEMENT ) {
int event = fastInfosetStreamReader.getEventType(); if(event == XMLStreamConstants.START_DOCUMENT) {
CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); int eventType = getEventType(); StringBuffer content = new StringBuffer(); while(eventType != END_ELEMENT ) {
/** Reads the content of a text-only element. Precondition: * the current event is START_ELEMENT. Postcondition: * The current event is the corresponding END_ELEMENT. * @throws XMLStreamException if the current event is not a START_ELEMENT or if * a non text element is encountered */ public final String getElementText() throws XMLStreamException { if(getEventType() != START_ELEMENT) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); } //current is StartElement, move to the next next(); return getElementText(true); } /**
CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); int eventType = getEventType(); StringBuilder content = new StringBuilder(); while(eventType != END_ELEMENT ) {
/** Reads the content of a text-only element. Precondition: * the current event is START_ELEMENT. Postcondition: * The current event is the corresponding END_ELEMENT. * @throws XMLStreamException if the current event is not a START_ELEMENT or if * a non text element is encountered */ public final String getElementText() throws XMLStreamException { if(getEventType() != START_ELEMENT) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); } //current is StartElement, move to the next next(); return getElementText(true); } /**
/** Reads the content of a text-only element. Precondition: * the current event is START_ELEMENT. Postcondition: * The current event is the corresponding END_ELEMENT. * @throws XMLStreamException if the current event is not a START_ELEMENT or if * a non text element is encountered */ public final String getElementText() throws XMLStreamException { if(getEventType() != START_ELEMENT) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); } //current is StartElement, move to the next next(); return getElementText(true); } /**
/** if the current tag has already read, such as in the case EventReader's * peek() has been called, the current cursor should not move before the loop */ public final int nextTag(boolean currentTagRead) throws XMLStreamException { int eventType = getEventType(); if (!currentTagRead) { eventType = next(); } while((eventType == CHARACTERS && isWhiteSpace()) // skip whitespace || (eventType == CDATA && isWhiteSpace()) || eventType == SPACE || eventType == PROCESSING_INSTRUCTION || eventType == COMMENT) { eventType = next(); } if (eventType != START_ELEMENT && eventType != END_ELEMENT) { throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.expectedStartOrEnd"), getLocation()); } return eventType; }
/** if the current tag has already read, such as in the case EventReader's * peek() has been called, the current cursor should not move before the loop */ public final int nextTag(boolean currentTagRead) throws XMLStreamException { int eventType = getEventType(); if (!currentTagRead) { eventType = next(); } while((eventType == CHARACTERS && isWhiteSpace()) // skip whitespace || (eventType == CDATA && isWhiteSpace()) || eventType == SPACE || eventType == PROCESSING_INSTRUCTION || eventType == COMMENT) { eventType = next(); } if (eventType != START_ELEMENT && eventType != END_ELEMENT) { throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.expectedStartOrEnd"), getLocation()); } return eventType; }
/** if the current tag has already read, such as in the case EventReader's * peek() has been called, the current cursor should not move before the loop */ public final int nextTag(boolean currentTagRead) throws XMLStreamException { int eventType = getEventType(); if (!currentTagRead) { eventType = next(); } while((eventType == CHARACTERS && isWhiteSpace()) // skip whitespace || (eventType == CDATA && isWhiteSpace()) || eventType == SPACE || eventType == PROCESSING_INSTRUCTION || eventType == COMMENT) { eventType = next(); } if (eventType != START_ELEMENT && eventType != END_ELEMENT) { throw new XMLStreamException(CommonResourceBundle.getInstance().getString("message.expectedStartOrEnd"), getLocation()); } return eventType; }
int event = fastInfosetStreamReader.getEventType(); if(event == XMLStreamConstants.START_DOCUMENT) {
int event = fastInfosetStreamReader.getEventType(); if(event == XMLStreamConstants.START_DOCUMENT) {