|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.xml.XMLTokenizerFactory
public final class XMLTokenizerFactory
Static factory for creating a TextTokenizer
s
for XML-like input.
Field Summary | |
---|---|
static String |
MARKUP_DECL
Pattern string specifying an markup declaration within a doctype declaration. |
static String |
PE_REFERENCE
Pattern string specifying a PE reference within a doctype declaration. |
static String |
XML_ATTRIBUTE
Pattern string specifying an XML attribute (name = quoted-value pair). |
static String |
XML_CDATA_SECTION
Pattern string specifying a CDATA section in an XML document. |
static String |
XML_CDATA_TOKEN
Pattern string for a visible textual token in XML documents (contains neither whitespace nor markup). |
static String |
XML_COMMENT
Pattern string specifying an XML comment. |
static String |
XML_DOCTYPE
Pattern string specifying an XML document type declaration. |
static String |
XML_END_TAG
Pattern string specifying an XML end tag. |
static String |
XML_EQUAL_SIGN
Pattern string for the '=' sign, optionally surrounded by whitespace. |
static String |
XML_NAME
Pattern string for XML names (according to XML 1.1). |
static String |
XML_NAME_START_CHAR
Pattern string specifying the class of valid start characters of XML names. |
static String |
XML_OPT_WHITESPACE
Pattern specifying optional whitespace in an XML document (zero or more whitespace characters). |
static String[] |
XML_PATTERNS
The array of patterns used for shallow XML parsing. |
static String |
XML_PROLOG_OR_PI
Pattern string specifying an XML prolog or processing instruction. |
static String |
XML_QUOTED_STRING
Pattern string for strings enclosed in full or half quotes, e.g. |
static String |
XML_START_OR_EMPTY_TAG
Pattern string specifying an XML start or empty tag (combined into a single pattern to avoid unnecessary backtracking). |
static String |
XML_TEXTUAL_CONTENT
Pattern string specifying textual content (character data) in an XML document. |
static String |
XML_WHITESPACE
Pattern specifying whitespace in an XML document (one or more whitespace characters). |
static String |
XML_WHITESPACE_CHARS
Pattern fragment listing allowed whitespace characters in an XML document. |
Method Summary | |
---|---|
static TextTokenizer |
createXMLTokenizer(CharSequence text,
boolean ensureWhitespace)
Factory method to create an instance for parsing files in XML syntax. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String XML_WHITESPACE_CHARS
public static final String XML_WHITESPACE
public static final String XML_OPT_WHITESPACE
public static final String XML_NAME_START_CHAR
public static final String XML_NAME
public static final String XML_QUOTED_STRING
public static final String XML_EQUAL_SIGN
public static final String XML_ATTRIBUTE
public static final String XML_CDATA_TOKEN
public static final String XML_START_OR_EMPTY_TAG
public static final String XML_END_TAG
public static final String XML_PROLOG_OR_PI
public static final String XML_COMMENT
public static final String PE_REFERENCE
public static final String MARKUP_DECL
public static final String XML_DOCTYPE
public static final String XML_CDATA_SECTION
public static final String XML_TEXTUAL_CONTENT
public static final String[] XML_PATTERNS
Method Detail |
---|
public static TextTokenizer createXMLTokenizer(CharSequence text, boolean ensureWhitespace)
The type of token returns can be determined by calling
TextTokenizer.capturedText()
:
Whitespace between tags and before and after textual content can be
retrieved using the TextTokenizer.precedingWhitespace()
method.
text
- the text to tokenizeensureWhitespace
- whether to validate whitespace
(TextTokenizer.isWhitespacePatternEnsured()
), throwing an
exception if a document contains serious errors (i.e. an unescaped "<"
within textual content); if false
, the caller is responsible
for validating whitespace
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |