/** * Returns true if the cursor points to a character data event that consists of all whitespace * Application calling this method needs to cache the value and avoid calling this method again * for the same event. * @return true if the cursor points to all whitespace, false otherwise */ public final boolean isWhiteSpace() { if(isCharacters() || (_eventType == CDATA)){ char [] ch = this.getTextCharacters(); int start = this.getTextStart(); int length = this.getTextLength(); for (int i=start; i< length;i++){ if(!XMLChar.isSpace(ch[i])){ return false; } } return true; } return false; }
/** * Returns true if the cursor points to a character data event that consists of all whitespace * Application calling this method needs to cache the value and avoid calling this method again * for the same event. * @return true if the cursor points to all whitespace, false otherwise */ public final boolean isWhiteSpace() { if(isCharacters() || (_eventType == CDATA)){ char [] ch = this.getTextCharacters(); int start = this.getTextStart(); int length = this.getTextLength(); for (int i = start; i < start + length; i++){ if(!XMLChar.isSpace(ch[i])){ return false; } } return true; } return false; }
/** * Returns true if the cursor points to a character data event that consists of all whitespace * Application calling this method needs to cache the value and avoid calling this method again * for the same event. * @return true if the cursor points to all whitespace, false otherwise */ public final boolean isWhiteSpace() { if(isCharacters() || (_eventType == CDATA)){ char [] ch = this.getTextCharacters(); int start = this.getTextStart(); int length = this.getTextLength(); for (int i = start; i < start + length; i++){ if(!XMLChar.isSpace(ch[i])){ return false; } } return true; } return false; }