public class TagParseState extends SingleCharacterReceiver
charBuffer
Constructor and Description |
---|
TagParseState() |
Modifier and Type | Method and Description |
---|---|
protected static String |
attributeDecode(String input)
Decode an html attribute
|
boolean |
dealWithCharacter(char thisChar)
Deal with a character.
|
protected boolean |
dumpValues(String value) |
protected static boolean |
isPunctuation(char x)
Is a character markup language punctuation?
|
protected static boolean |
isWhitespace(char x)
Is a character markup language whitespace?
|
protected static String |
mapChunk(String input)
Map an entity reference back to a character
|
protected StringBuilder |
newBuffer()
Allocate the buffer.
|
protected boolean |
noteBTag(String tagName)
This method is called for every ...
|
protected boolean |
noteBTagToken(String token)
This method gets called for every token inside a btag.
|
protected boolean |
noteEndBTag()
This method is called for the end of every btag, or any time
there's a naked '>' in the document.
|
protected boolean |
noteEndEscaped()
Called for the end of every cdata-like tag.
|
protected boolean |
noteEndTag(String tagName)
This method gets called for every end tag.
|
protected boolean |
noteEscaped(String token)
Called for the start of every cdata-like tag, e.g.
|
protected boolean |
noteEscapedCharacter(char thisChar)
This method gets called for every character that is found within an
escape block, e.g.
|
protected boolean |
noteNormalCharacter(char thisChar)
This method gets called for every character that is not part of a tag etc.
|
protected boolean |
noteQTag(String tagName,
List<AttrNameValue> attributes)
This method is called for every ...
|
protected boolean |
noteTag(String tagName,
List<AttrNameValue> attributes)
This method gets called for every tag.
|
protected boolean |
outputAmpBuffer()
Interpret ampersand buffer.
|
dealWithCharacters, dealWithRemainder
finishUp
protected static final int TAGPARSESTATE_NORMAL
protected static final int TAGPARSESTATE_SAWLEFTANGLE
protected static final int TAGPARSESTATE_SAWEXCLAMATION
protected static final int TAGPARSESTATE_SAWDASH
protected static final int TAGPARSESTATE_IN_COMMENT
protected static final int TAGPARSESTATE_SAWCOMMENTDASH
protected static final int TAGPARSESTATE_SAWSECONDCOMMENTDASH
protected static final int TAGPARSESTATE_IN_TAG_NAME
protected static final int TAGPARSESTATE_IN_ATTR_NAME
protected static final int TAGPARSESTATE_IN_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_TAG_SAW_SLASH
protected static final int TAGPARSESTATE_IN_END_TAG_NAME
protected static final int TAGPARSESTATE_IN_ATTR_LOOKING_FOR_VALUE
protected static final int TAGPARSESTATE_IN_SINGLE_QUOTES_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_DOUBLE_QUOTES_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_UNQUOTED_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_QTAG_NAME
protected static final int TAGPARSESTATE_IN_QTAG_ATTR_NAME
protected static final int TAGPARSESTATE_IN_QTAG_SAW_QUESTION
protected static final int TAGPARSESTATE_IN_QTAG_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_QTAG_ATTR_LOOKING_FOR_VALUE
protected static final int TAGPARSESTATE_IN_QTAG_SINGLE_QUOTES_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_QTAG_DOUBLE_QUOTES_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_QTAG_UNQUOTED_ATTR_VALUE
protected static final int TAGPARSESTATE_IN_BRACKET_TOKEN
protected static final int TAGPARSESTATE_NEED_FINAL_BRACKET
protected static final int TAGPARSESTATE_IN_BANG_TOKEN
protected static final int TAGPARSESTATE_IN_CDATA_BODY
protected static final int TAGPARSESTATE_SAWRIGHTBRACKET
protected static final int TAGPARSESTATE_SAWSECONDRIGHTBRACKET
protected int currentState
protected int bTagDepth
protected StringBuilder accumBuffer
protected StringBuilder currentTagNameBuffer
protected StringBuilder currentAttrNameBuffer
protected StringBuilder currentValueBuffer
protected String currentTagName
protected String currentAttrName
protected List<AttrNameValue> currentAttrList
protected boolean inAmpersand
protected StringBuilder ampBuffer
public boolean dealWithCharacter(char thisChar) throws ManifoldCFException
dealWithCharacter
in class SingleCharacterReceiver
ManifoldCFException
protected StringBuilder newBuffer()
protected boolean outputAmpBuffer() throws ManifoldCFException
ManifoldCFException
protected boolean dumpValues(String value) throws ManifoldCFException
ManifoldCFException
protected boolean noteTag(String tagName, List<AttrNameValue> attributes) throws ManifoldCFException
ManifoldCFException
protected boolean noteEndTag(String tagName) throws ManifoldCFException
ManifoldCFException
protected boolean noteQTag(String tagName, List<AttrNameValue> attributes) throws ManifoldCFException
ManifoldCFException
protected boolean noteBTag(String tagName) throws ManifoldCFException
ManifoldCFException
protected boolean noteEndBTag() throws ManifoldCFException
ManifoldCFException
protected boolean noteEscaped(String token) throws ManifoldCFException
token
- may be empty!!!ManifoldCFException
protected boolean noteEndEscaped() throws ManifoldCFException
ManifoldCFException
protected boolean noteBTagToken(String token) throws ManifoldCFException
ManifoldCFException
protected boolean noteNormalCharacter(char thisChar) throws ManifoldCFException
ManifoldCFException
protected boolean noteEscapedCharacter(char thisChar) throws ManifoldCFException
ManifoldCFException
protected static boolean isWhitespace(char x)
protected static boolean isPunctuation(char x)