int type = getTokenType(index);
int type; if (index<vtdSize) type = getTokenType(index); else return -1;
	public int getText() {		int index = (context[0] != 0) ? context[context[0]] + 1 : rootIndex + 1;		int depth = getCurrentDepth();		int type = getTokenType(index);		while (index < vtdSize) {			if (type == TOKEN_CHARACTER_DATA || type == TOKEN_CDATA_VAL) {				if (depth == getTokenDepth(index))					return index;				else					return -1;			} else if (type == TOKEN_ATTR_NS || type == TOKEN_ATTR_NAME) {				index += 2; // assuming a single token for attr val			} else if (				type == TOKEN_PI_NAME					|| type == TOKEN_PI_VAL					|| type == TOKEN_COMMENT) {				if (depth == getTokenDepth(index)) {					index += 1;				} else					return -1;			} else				return -1;			type = getTokenType(index);		}		return -1;	}