/** 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 String getElementText() throws XMLStreamException { if(!hasEvent) { throw new NoSuchElementException(); } if(!_currentEvent.isStartElement()) { StAXDocumentParser parser = (StAXDocumentParser)_streamReader; return parser.getElementText(true); } else { return _streamReader.getElementText(); } }
/** 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 String getElementText() throws XMLStreamException { if(!hasEvent) { throw new NoSuchElementException(); } if(!_currentEvent.isStartElement()) { StAXDocumentParser parser = (StAXDocumentParser)_streamReader; return parser.getElementText(true); } else { return _streamReader.getElementText(); } }
/** 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 String getElementText() throws XMLStreamException { if(!hasEvent) { throw new NoSuchElementException(); } if(!_currentEvent.isStartElement()) { StAXDocumentParser parser = (StAXDocumentParser)_streamReader; return parser.getElementText(true); } else { return _streamReader.getElementText(); } }
/** 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); } /**