com.japisoft.dtdparser
Class Parser

java.lang.Object
  |
  +--com.japisoft.dtdparser.Parser

public class Parser
extends java.lang.Object

Main parser for the DTD

Author:
(c) 2002-2003 JAPISOFT

Constructor Summary
Parser()
           
 
Method Summary
 DTDDocumentBuilder getDTDDocumentBuilder()
           
 RootDTDNode getDTDElement()
           
 XMLGenerator getXMLGenerator()
           
 XMLValidator getXMLValidator()
           
 void parse(java.io.InputStream input)
          Parse the DTD provided by the following inputstream
protected  int parseAttribute(java.lang.String str, int location)
          Parse the attribute starting at location
protected  int parseComment(java.lang.String str, int location)
          Parse the comment starting at location
protected  int parseElement(java.lang.String str, int location)
          Parse the element starting at location
protected  int parseEntity(java.lang.String str, int location)
          Parse the entity starting at location
 void setDTDDocumentBuilder(DTDDocumentBuilder builder)
          Set the builder for DTD document type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Method Detail

setDTDDocumentBuilder

public void setDTDDocumentBuilder(DTDDocumentBuilder builder)
Set the builder for DTD document type


getDTDDocumentBuilder

public DTDDocumentBuilder getDTDDocumentBuilder()
Returns:
the current DTD document builder

getDTDElement

public RootDTDNode getDTDElement()
Returns:
the result of the parsing

getXMLValidator

public XMLValidator getXMLValidator()
Returns:
a document validator for this DTD

getXMLGenerator

public XMLGenerator getXMLGenerator()
Returns:
a XML minimal document generator

parse

public void parse(java.io.InputStream input)
           throws java.io.IOException
Parse the DTD provided by the following inputstream

java.io.IOException

parseEntity

protected int parseEntity(java.lang.String str,
                          int location)
Parse the entity starting at location

Returns:
the next location to process

parseElement

protected int parseElement(java.lang.String str,
                           int location)
Parse the element starting at location

Returns:
the next location to process

parseAttribute

protected int parseAttribute(java.lang.String str,
                             int location)
Parse the attribute starting at location

Returns:
the next location to process

parseComment

protected int parseComment(java.lang.String str,
                           int location)
Parse the comment starting at location

Returns:
the next location to process