public static enum XmlScanner.TokenType extends Enum<XmlScanner.TokenType>
Enum Constant and Description |
---|
ATTRIBUTE_NAME
AttributeName ::= S Name |
ATTRIBUTE_VALUE
AttributeValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" |
BEGIN_TAG
The beginning of an empty element tag or a start tag (but not the beginning of an end
tag!).
|
CDATA_SECTION
CDSect ::= CDStart CData CDEnd {@code CDStart ::= ' |
CHAR_DATA
CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) |
CHARACTER_REFERENCE
CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' |
COMMENT
{@code Comment ::= '
|
DOCUMENT_TYPE_DECLARATION
{@code doctypedecl ::= '
|
END_EMPTY_ELEMENT_TAG
The end of an empty element tag.
|
END_START_TAG
The end of a start tag.
|
END_TAG
{@code ETag ::= '' Name S?
|
ENTITY_REFERENCE
EntityRef ::= '&' Name ';' |
PROCESSING_INSTRUCTION
Example:
{@code
|
XML_DECLARATION
{@code XMLDecl ::= '
|
Modifier and Type | Method and Description |
---|---|
static XmlScanner.TokenType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static XmlScanner.TokenType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final XmlScanner.TokenType XML_DECLARATION
XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
VersionInfo ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
Eq ::= S? '=' S?
VersionNum ::= '1.' [0-9]+
EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'" )
EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
public static final XmlScanner.TokenType COMMENT
Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
public static final XmlScanner.TokenType PROCESSING_INSTRUCTION
<?xml-stylesheet href="mystyle.css" type="text/css"?>
PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
public static final XmlScanner.TokenType DOCUMENT_TYPE_DECLARATION
doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' intSubset ']' S?)? '>'
ExternalID ::= 'SYSTEM' S SystemLiteral | 'PUBLIC' S PubidLiteral S SystemLiteral
SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'")
PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'"
PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
intSubset ::= (markupdecl | DeclSep)*
markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment
elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>'
contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
Mixed ::= '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*' | '(' S? '#PCDATA' S? ')'
children ::= (choice | seq) ('?' | '*' | '+')?
cp ::= (Name | choice | seq) ('?' | '*' | '+')?
choice ::= '(' S? cp ( S? '|' S? cp )+ S? ')'
seq ::= '(' S? cp ( S? ',' S? cp )* S? ')'
public static final XmlScanner.TokenType BEGIN_TAG
StartTag ::= BeginTag Attribute* EndStartTag
EmptyElementTag ::= BeginTag Attribute* EndEmptyElementTag
BeginTag ::= '<' Name
Attribute ::= S AttributeName Eq AttributeValue
public static final XmlScanner.TokenType ATTRIBUTE_NAME
AttributeName ::= S Name
BEGIN_TAG
public static final XmlScanner.TokenType ATTRIBUTE_VALUE
AttributeValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
BEGIN_TAG
public static final XmlScanner.TokenType END_START_TAG
EndOfStartTag ::= S? '>'
BEGIN_TAG
public static final XmlScanner.TokenType END_EMPTY_ELEMENT_TAG
EndOfEmptyElementTag ::= S? '/>'
BEGIN_TAG
public static final XmlScanner.TokenType END_TAG
ETag ::= '</' Name S? '>'
public static final XmlScanner.TokenType CHAR_DATA
CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
public static final XmlScanner.TokenType ENTITY_REFERENCE
EntityRef ::= '&' Name ';'
public static final XmlScanner.TokenType CHARACTER_REFERENCE
CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
public static final XmlScanner.TokenType CDATA_SECTION
CDSect ::= CDStart CData CDEnd
CDStart ::= '<![CDATA['
CData ::= (Char* - (Char* ']]>' Char*))
CDEnd ::= ']]>'
public static XmlScanner.TokenType[] values()
for (XmlScanner.TokenType c : XmlScanner.TokenType.values()) System.out.println(c);
public static XmlScanner.TokenType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018 Arno Unkrig. All rights reserved.