}
@Override
protected boolean endSequenceDetected(ICharacterScanner scanner) {
boolean result = super.endSequenceDetected(scanner);
CharacterScannerWrapper scannerWrapper = new CharacterScannerWrapper(scanner);
int currentChar = scannerWrapper.read();
scannerWrapper.unread();
if (result && currentChar != ICharacterScanner.EOF) {
scannerWrapper.unread();
char c = (char)scannerWrapper.read();
StringBuffer readSoFar = new StringBuffer();
readSoFar.append(c);
int count = 0;
// search backwards an count unexcaped '"' - stop at _startSequence - if (count % 2) != 0 we have an open attribute
while (!readSoFar.toString().endsWith(reverse(_startSequence))) {
if (c == '"') {
// check if '"' is unescaped
CharacterScannerWrapper wrapper = new CharacterScannerWrapper(scanner);
wrapper.unread();
wrapper.unread();
c = (char) wrapper.read();
if (c != '\\') {
count++;
}
wrapper.reset();
}
scannerWrapper.unread();
scannerWrapper.unread();
//bug fix #00000822
if (c == '\n') {