com.swabunga.spell.event
Class XMLWordFinder

java.lang.Object
  |
  +--com.swabunga.spell.event.AbstractWordFinder
        |
        +--com.swabunga.spell.event.XMLWordFinder
All Implemented Interfaces:
WordFinder

public class XMLWordFinder
extends AbstractWordFinder

A word finder for XML or HTML documents, which searches text for sequences of letters, but ignores the text inside any tags.

Author:
Anthony Roy (ajr@antroy.co.uk)

Fields inherited from class com.swabunga.spell.event.AbstractWordFinder
currentWord, nextWord, sentenceIterator, startsSentence, text
 
Constructor Summary
XMLWordFinder(java.lang.String inText)
          Creates a new DefaultWordFinder object.
 
Method Summary
 Word next()
          This method scans the text from the end of the last word, and returns a new Word object corresponding to the next word.
 
Methods inherited from class com.swabunga.spell.event.AbstractWordFinder
current, getText, hasNext, ignore, ignore, ignore, ignore, init, isWordChar, isWordChar, replace, setSentenceIterator, setText, startsSentence, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLWordFinder

public XMLWordFinder(java.lang.String inText)
Creates a new DefaultWordFinder object.
Parameters:
inText - the text to search.
Method Detail

next

public Word next()
This method scans the text from the end of the last word, and returns a new Word object corresponding to the next word.
Overrides:
next in class AbstractWordFinder
Returns:
the next word.
Throws:
WordNotFoundException - search string contains no more words.