parser
Class XMLDocumentReader

java.lang.Object
  extended by parser.XMLDocumentReader

public class XMLDocumentReader
extends java.lang.Object


Field Summary
protected static int AMPERSAND
           
protected static int ATTRIBUTE_EQUALS
           
protected static int ATTRIBUTE_NAME
           
protected static int ATTRIBUTE_OPEN_VALUE
           
protected static int ATTRIBUTE_VALUE
           
protected static int ATTRIBUTES
           
protected static int BRACKETCLOSE
           
protected static int BRACKETOPEN
           
protected static int CDATA
           
protected static int COLON
           
private  int column
           
protected static int COMMENT
           
protected static int CR
           
private  Element document
           
protected static int ELEMENT_CLOSE
           
protected static int ELEMENT_CLOSE_NAME
           
protected static int ELEMENT_INNER
           
protected static int ELEMENT_NAME
           
protected static int ELEMENT_OPEN
           
protected static int ELEMENT_UNDEF
           
protected static int ENDOFCDATA
           
protected static int EOF
           
protected static int EQUALS
           
protected static int EXCLAMATION
           
private  java.lang.String filename
           
protected static int GREATER
           
protected static int HEADER
           
protected static int INTERROGATION
           
protected static int LESS
           
protected static int LF
           
private  int line
           
protected static int MINUS
           
protected static int QUOTE
           
private  java.io.InputStreamReader reader
           
protected static int SEMICOLON
           
protected static int SHARP
           
protected static int SLASH
           
protected static int SPACE
           
protected static int START
           
protected static int TAB
           
private  int tagger
           
protected static int UNDERSCORE
           
 
Constructor Summary
XMLDocumentReader(java.lang.String filename)
           
XMLDocumentReader(java.net.URL filenameURL)
           
 
Method Summary
private  void clear(java.lang.StringBuffer word)
           
private  void createDocument()
           
private  void createElement(java.lang.StringBuffer word, java.util.ArrayList<Element> elementsStack)
           
 Element getXMLDocument()
           
private  boolean isBlank(int c)
           
private  boolean isCharacter(int c)
           
private  boolean isDigit(int c)
           
private  int read(int previous)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF

protected static final int EOF
See Also:
Constant Field Values

SPACE

protected static final int SPACE
See Also:
Constant Field Values

CR

protected static final int CR
See Also:
Constant Field Values

LF

protected static final int LF
See Also:
Constant Field Values

TAB

protected static final int TAB
See Also:
Constant Field Values

QUOTE

protected static final int QUOTE
See Also:
Constant Field Values

GREATER

protected static final int GREATER
See Also:
Constant Field Values

LESS

protected static final int LESS
See Also:
Constant Field Values

EXCLAMATION

protected static final int EXCLAMATION
See Also:
Constant Field Values

INTERROGATION

protected static final int INTERROGATION
See Also:
Constant Field Values

MINUS

protected static final int MINUS
See Also:
Constant Field Values

SLASH

protected static final int SLASH
See Also:
Constant Field Values

AMPERSAND

protected static final int AMPERSAND
See Also:
Constant Field Values

SEMICOLON

protected static final int SEMICOLON
See Also:
Constant Field Values

COLON

protected static final int COLON
See Also:
Constant Field Values

EQUALS

protected static final int EQUALS
See Also:
Constant Field Values

UNDERSCORE

protected static final int UNDERSCORE
See Also:
Constant Field Values

BRACKETOPEN

protected static final int BRACKETOPEN
See Also:
Constant Field Values

BRACKETCLOSE

protected static final int BRACKETCLOSE
See Also:
Constant Field Values

SHARP

protected static final int SHARP
See Also:
Constant Field Values

START

protected static final int START
See Also:
Constant Field Values

ELEMENT_OPEN

protected static final int ELEMENT_OPEN
See Also:
Constant Field Values

ELEMENT_NAME

protected static final int ELEMENT_NAME
See Also:
Constant Field Values

ELEMENT_INNER

protected static final int ELEMENT_INNER
See Also:
Constant Field Values

ELEMENT_UNDEF

protected static final int ELEMENT_UNDEF
See Also:
Constant Field Values

ELEMENT_CLOSE

protected static final int ELEMENT_CLOSE
See Also:
Constant Field Values

ELEMENT_CLOSE_NAME

protected static final int ELEMENT_CLOSE_NAME
See Also:
Constant Field Values

ATTRIBUTES

protected static final int ATTRIBUTES
See Also:
Constant Field Values

ATTRIBUTE_NAME

protected static final int ATTRIBUTE_NAME
See Also:
Constant Field Values

ATTRIBUTE_EQUALS

protected static final int ATTRIBUTE_EQUALS
See Also:
Constant Field Values

ATTRIBUTE_OPEN_VALUE

protected static final int ATTRIBUTE_OPEN_VALUE
See Also:
Constant Field Values

ATTRIBUTE_VALUE

protected static final int ATTRIBUTE_VALUE
See Also:
Constant Field Values

HEADER

protected static final int HEADER
See Also:
Constant Field Values

COMMENT

protected static final int COMMENT
See Also:
Constant Field Values

CDATA

protected static final int CDATA
See Also:
Constant Field Values

ENDOFCDATA

protected static final int ENDOFCDATA
See Also:
Constant Field Values

reader

private java.io.InputStreamReader reader

filename

private java.lang.String filename

document

private Element document

line

private int line

column

private int column

tagger

private int tagger
Constructor Detail

XMLDocumentReader

public XMLDocumentReader(java.lang.String filename)
                  throws MalformedXMLException,
                         java.io.FileNotFoundException,
                         java.io.IOException
Throws:
MalformedXMLException
java.io.FileNotFoundException
java.io.IOException

XMLDocumentReader

public XMLDocumentReader(java.net.URL filenameURL)
                  throws MalformedXMLException,
                         java.io.FileNotFoundException,
                         java.io.IOException
Throws:
MalformedXMLException
java.io.FileNotFoundException
java.io.IOException
Method Detail

createDocument

private void createDocument()
                     throws MalformedXMLException,
                            java.io.IOException
Throws:
MalformedXMLException
java.io.IOException

createElement

private void createElement(java.lang.StringBuffer word,
                           java.util.ArrayList<Element> elementsStack)

clear

private void clear(java.lang.StringBuffer word)

read

private int read(int previous)
          throws java.io.IOException
Throws:
java.io.IOException

isBlank

private boolean isBlank(int c)

isDigit

private boolean isDigit(int c)

isCharacter

private boolean isCharacter(int c)

getXMLDocument

public Element getXMLDocument()