|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wutka.dtd.DTDParser
public class DTDParser
Parses a DTD file and returns a DTD object
Field Summary | |
---|---|
protected java.lang.Object |
defaultLocation
|
protected DTD |
dtd
|
protected com.wutka.dtd.Scanner |
scanner
|
Constructor Summary | |
---|---|
DTDParser(java.io.File in)
Creates a parser that will read from the specified File object |
|
DTDParser(java.io.File in,
boolean trace)
Creates a parser that will read from the specified File object |
|
DTDParser(java.io.Reader in)
Creates a parser that will read from the specified Reader object |
|
DTDParser(java.io.Reader in,
boolean trace)
Creates a parser that will read from the specified Reader object |
|
DTDParser(java.net.URL in)
Creates a parser that will read from the specified URL object |
|
DTDParser(java.net.URL in,
boolean trace)
Creates a parser that will read from the specified URL object |
Method Summary | |
---|---|
DTDEntity |
expandEntity(java.lang.String name)
|
protected com.wutka.dtd.Token |
expect(com.wutka.dtd.TokenType expected)
|
DTD |
parse()
Parses the DTD file and returns a DTD object describing the DTD. |
DTD |
parse(boolean guessRootElement)
Parses the DTD file and returns a DTD object describing the DTD. |
protected void |
parseAttdef(com.wutka.dtd.Scanner scanner,
DTDElement element,
DTDAttlist attlist)
|
protected void |
parseAttlist()
|
protected DTDCardinal |
parseCardinality()
|
protected void |
parseChildren(DTDElement element)
|
protected DTDContainer |
parseChoiceSequence()
|
protected void |
parseContentSpec(com.wutka.dtd.Scanner scanner,
DTDElement element)
|
protected DTDItem |
parseCP()
|
protected void |
parseElement()
|
protected void |
parseEntity()
|
protected void |
parseEntityDef(DTDEntity entity)
|
protected DTDEnumeration |
parseEnumeration()
|
protected void |
parseMixed(DTDElement element)
|
protected void |
parseNotation()
|
protected DTDNotationList |
parseNotationList()
|
protected void |
parseTopLevelElement()
|
protected void |
removeElements(java.util.Hashtable h,
DTD dtd,
DTDItem item)
|
protected void |
skipUntil(com.wutka.dtd.TokenType stopToken)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.wutka.dtd.Scanner scanner
protected DTD dtd
protected java.lang.Object defaultLocation
Constructor Detail |
---|
public DTDParser(java.io.Reader in)
public DTDParser(java.io.Reader in, boolean trace)
in
- The input stream to readtrace
- True if the parser should print out tokens as it reads them
(used for debugging the parser)public DTDParser(java.io.File in) throws java.io.IOException
java.io.IOException
public DTDParser(java.io.File in, boolean trace) throws java.io.IOException
in
- The file to readtrace
- True if the parser should print out tokens as it reads them
(used for debugging the parser)
java.io.IOException
public DTDParser(java.net.URL in) throws java.io.IOException
java.io.IOException
public DTDParser(java.net.URL in, boolean trace) throws java.io.IOException
in
- The URL to readtrace
- True if the parser should print out tokens as it reads them
(used for debugging the parser)
java.io.IOException
Method Detail |
---|
public DTD parse() throws java.io.IOException
java.io.IOException
public DTD parse(boolean guessRootElement) throws java.io.IOException
guessRootElement
- If true, tells the parser to try to guess the
root element of the document by process of elimination
java.io.IOException
protected void removeElements(java.util.Hashtable h, DTD dtd, DTDItem item)
protected void parseTopLevelElement() throws java.io.IOException
java.io.IOException
protected void skipUntil(com.wutka.dtd.TokenType stopToken) throws java.io.IOException
java.io.IOException
protected com.wutka.dtd.Token expect(com.wutka.dtd.TokenType expected) throws java.io.IOException
java.io.IOException
protected void parseElement() throws java.io.IOException
java.io.IOException
protected void parseContentSpec(com.wutka.dtd.Scanner scanner, DTDElement element) throws java.io.IOException
java.io.IOException
protected void parseMixed(DTDElement element) throws java.io.IOException
java.io.IOException
protected void parseChildren(DTDElement element) throws java.io.IOException
java.io.IOException
protected DTDContainer parseChoiceSequence() throws java.io.IOException
java.io.IOException
protected DTDItem parseCP() throws java.io.IOException
java.io.IOException
protected DTDCardinal parseCardinality() throws java.io.IOException
java.io.IOException
protected void parseAttlist() throws java.io.IOException
java.io.IOException
protected void parseAttdef(com.wutka.dtd.Scanner scanner, DTDElement element, DTDAttlist attlist) throws java.io.IOException
java.io.IOException
protected DTDNotationList parseNotationList() throws java.io.IOException
java.io.IOException
protected DTDEnumeration parseEnumeration() throws java.io.IOException
java.io.IOException
protected void parseEntity() throws java.io.IOException
java.io.IOException
protected void parseEntityDef(DTDEntity entity) throws java.io.IOException
java.io.IOException
protected void parseNotation() throws java.io.IOException
java.io.IOException
public DTDEntity expandEntity(java.lang.String name)
expandEntity
in interface EntityExpansion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |