protected Location getCurrentLocation() { return fastInfosetStreamReader.getLocation(); }
protected Location getCurrentLocation() { return fastInfosetStreamReader.getLocation(); }
protected Location getCurrentLocation() { return fastInfosetStreamReader.getLocation(); }
protected Location getCurrentLocation() { return fastInfosetStreamReader.getLocation(); }
if (!startElementRead) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); } else if(eventType == START_ELEMENT) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.getElementTextExpectTextOnly"), getLocation()); } else { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());
if (!startElementRead) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); } else if(eventType == START_ELEMENT) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.getElementTextExpectTextOnly"), getLocation()); } else { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());
if (!startElementRead) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.mustBeOnSTARTELEMENT"), getLocation()); } else if(eventType == START_ELEMENT) { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.getElementTextExpectTextOnly"), getLocation()); } else { throw new XMLStreamException( CommonResourceBundle.getInstance().getString("message.unexpectedEventType")+ getEventTypeString(eventType), getLocation());
/** 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); } /**
/** 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; }