Package de.pdark.decentxml.dtd
Class DTDTokenizer
java.lang.Object
de.pdark.decentxml.XMLTokenizer
de.pdark.decentxml.dtd.DTDTokenizer
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
FieldsModifier and TypeFieldDescriptionprotected int
>= 0 as long as we're inside of a DOCTYPEFields inherited from class de.pdark.decentxml.XMLTokenizer
inStartElement, pos, source
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The current position in the XML sourcenext()
Fetch the next token from the source.protected void
parseDocTypeComment
(Token token) protected void
parseDocTypeConstant
(Token token) #implied, #pcdata, ...protected void
""protected void
parseDocTypeQuotedText
(Token token) protected void
parseDocTypeText
(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
-
Field Details
-
docTypeLevel
protected int docTypeLevel>= 0 as long as we're inside of a DOCTYPE
-
-
Constructor Details
-
DTDTokenizer
Create an DTD tokenizer. startPosition must point at "invalid input: '<'!DOCTYPE" in the source.
-
-
Method Details
-
getOffset
public int getOffset()The current position in the XML source- Overrides:
getOffset
in classXMLTokenizer
-
next
Fetch the next token from the source. Returnsnull
if 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:
next
in classXMLTokenizer
- Returns:
- The next token or
null
if the DTD has been read.
-
parseDocTypeConstant
#implied, #pcdata, ... -
parseDocTypeComment
-
parseDocTypeText
-
parseDocTypeQuotedText
-
parseDocTypeMarkupDeclaration
""
-