Overview  Package   Class  Tree  Index 

be.lassi.xml
Class XmlReader

java.lang.Object
  extended by be.lassi.xml.XmlReader
Direct Known Subclasses:
XmlShowReader

public class XmlReader
extends java.lang.Object

Helps in parsing xml, to be used by subclasses to actually do something useful with the xml.


Constructor Summary
XmlReader(java.io.Reader reader)
          Constructs a new instance.
 
Method Summary
protected  void endElement(java.lang.String name)
           
protected  void error(org.xml.sax.SAXParseException e)
           
protected  void error(java.lang.String string)
           
protected  void fatalError(org.xml.sax.SAXParseException e)
           
protected  java.lang.String get(int index)
          Gets the type of the parent element that is currently being processed.
protected  boolean getBoolean(java.lang.String name)
           
protected  int getInt(java.lang.String name)
           
protected  int getOptionalNumber(java.lang.String name)
           
protected  java.lang.String getString(java.lang.String name)
           
 java.lang.String parse()
           
protected  void startElement(java.lang.String name)
           
protected  void warning(org.xml.sax.SAXParseException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlReader

public XmlReader(java.io.Reader reader)
Constructs a new instance.

Parameters:
reader - reader that will be used to read the xml
Method Detail

endElement

protected void endElement(java.lang.String name)

error

protected void error(org.xml.sax.SAXParseException e)

error

protected void error(java.lang.String string)

fatalError

protected void fatalError(org.xml.sax.SAXParseException e)

get

protected java.lang.String get(int index)
Gets the type of the parent element that is currently being processed.

Parameters:
index - relative index of the parent (-1=parent of element that is currently being processed, -2=grand-parent, etc.).
Returns:
the type of the parent element

getBoolean

protected boolean getBoolean(java.lang.String name)

getInt

protected int getInt(java.lang.String name)

getOptionalNumber

protected int getOptionalNumber(java.lang.String name)

getString

protected java.lang.String getString(java.lang.String name)

parse

public java.lang.String parse()

startElement

protected void startElement(java.lang.String name)

warning

protected void warning(org.xml.sax.SAXParseException e)

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2