Package de.pdark.decentxml.dtd
Class DTDTokenizer
- java.lang.Object
-
- de.pdark.decentxml.XMLTokenizer
-
- de.pdark.decentxml.dtd.DTDTokenizer
-
public class DTDTokenizer extends XMLTokenizer
A parser for a DTD (inline or reference).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.pdark.decentxml.XMLTokenizer
XMLTokenizer.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected intdocTypeLevel>= 0 as long as we're inside of a DOCTYPE-
Fields inherited from class de.pdark.decentxml.XMLTokenizer
inStartElement, pos, source
-
-
Constructor Summary
Constructors Constructor Description DTDTokenizer(XMLSource source, int startPosition)Create an DTD tokenizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOffset()The current position in the XML sourceTokennext()Fetch the next token from the source.protected voidparseDocTypeComment(Token token)protected voidparseDocTypeConstant(Token token)#implied, #pcdata, ...protected voidparseDocTypeMarkupDeclaration(Token token)""protected voidparseDocTypeQuotedText(Token token)protected voidparseDocTypeText(Token token)-
Methods inherited from class de.pdark.decentxml.XMLTokenizer
createToken, expect, getCharValidator, getEntityResolver, getSource, isTreatEntitiesAsText, lookAheadForErrorMessage, nextChar, nextChars, parseAttribute, parseBeginElement, parseBeginSomething, parseCData, parseComment, parseDocType, parseEndElement, parseEntity, parseExcalamation, parseName, parseProcessingInstruction, parseText, setCharValidator, setEntityResolver, setOffset, setTreatEntitiesAsText, skipChar, skipWhiteSpace, verifyEntity
-
-
-
-
Constructor Detail
-
DTDTokenizer
public DTDTokenizer(XMLSource source, int startPosition)
Create an DTD tokenizer. startPosition must point at "-
Method Detail
-
getOffset
public int getOffset()
The current position in the XML source- Overrides:
getOffsetin classXMLTokenizer
-
next
public Token next()
Fetch the next token from the source. Returnsnullif there the complete doctype declaration has been read.If
next()returnsnull, the position of the tokenizer will be just after the end of the DTD declaration.- Overrides:
nextin classXMLTokenizer- Returns:
- The next token or
nullif the DTD has been read.
-
parseDocTypeConstant
protected void parseDocTypeConstant(Token token)
#implied, #pcdata, ...
-
parseDocTypeComment
protected void parseDocTypeComment(Token token)
-
parseDocTypeText
protected void parseDocTypeText(Token token)
-
parseDocTypeQuotedText
protected void parseDocTypeQuotedText(Token token)
-
parseDocTypeMarkupDeclaration
protected void parseDocTypeMarkupDeclaration(Token token)
""
-
-
-
-