public static class XPathParser.XPathTokenizer extends Object implements TokenStream.Tokenizer
TokenStream.Tokenizer implementation that parses single- and double-quoted strings,
symbols, words consisting of NCNames (as defined by the Namespaces in XML 1.0
specification), XPath comments,and other single-character tokens. Quoted phrases are delimited by
single-quote and double-quote characters (which may be escaped within the quote). XPath comments begin with a "(:" and end
with a ":)".| Modifier and Type | Field and Description |
|---|---|
static int |
COMMENT
The token type for tokens that consist of all the characters between "(:" and ":)".
|
static int |
NAME
The token type for tokens that represent an unquoted string containing a character sequence made up of non-whitespace
and non-symbol characters.
|
static int |
OTHER
The token type for tokens that consist of single characters that are not a
SYMBOL, valid NAME, or
QUOTED_STRING. |
static int |
QUOTED_STRING
The token type for tokens that consist of all the characters within single-quotes, double-quotes, or square brackets.
|
static int |
SYMBOL
The token type for tokens that consist of an individual "symbol" character.
|
| Constructor and Description |
|---|
XPathParser.XPathTokenizer(boolean useComments) |
| Modifier and Type | Method and Description |
|---|---|
void |
tokenize(TokenStream.CharacterStream input,
TokenStream.Tokens tokens)
Process the supplied characters and construct the appropriate
TokenStream.Token objects. |
public static final int NAME
public static final int SYMBOL
(){}*.,;+%?$!<>|=:-[]^/\#@public static final int QUOTED_STRING
public static final int COMMENT
public static final int OTHER
SYMBOL, valid NAME, or
QUOTED_STRING.public XPathParser.XPathTokenizer(boolean useComments)
public void tokenize(TokenStream.CharacterStream input, TokenStream.Tokens tokens) throws ParsingException
TokenStream.TokenizerTokenStream.Token objects.tokenize in interface TokenStream.Tokenizerinput - the character input stream; never nulltokens - the factory for TokenStream.Token objects, which records the order in which the tokens are createdParsingException - if there is an error while processing the character stream (e.g., a quote is not closed, etc.)Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.