Class TagTokenizer
java.lang.Object
com.opensymphony.module.sitemesh.html.tokenizer.TagTokenizer
Splits a chunk of HTML into 'text' and 'tag' tokens, for easy processing. Is VERY tolerant to badly formed HTML.
Usage
You need to supply a custom TokenHandler that will receive callbacks as text and tags are processed.
char[] input = ...; HTMLTagTokenizer tokenizer = new HTMLTagTokenizer(input); TokenHandler handler = new MyTokenHandler(); tokenizer.start(handler);
- Author:
- Joe Walnes
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTagTokenizer(char[] input) Instantiates a new tag tokenizer.TagTokenizer(char[] input, int length) Instantiates a new tag tokenizer.TagTokenizer(String input) Instantiates a new tag tokenizer. -
Method Summary
-
Constructor Details
-
TagTokenizer
public TagTokenizer(char[] input) Instantiates a new tag tokenizer.- Parameters:
input- the input
-
TagTokenizer
public TagTokenizer(char[] input, int length) Instantiates a new tag tokenizer.- Parameters:
input- the inputlength- the length
-
TagTokenizer
Instantiates a new tag tokenizer.- Parameters:
input- the input
-
-
Method Details
-
start
Start.- Parameters:
handler- the handler
-