com.transjam.util
Class XMLReader
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.io.PushbackInputStream
|
+--com.transjam.util.XMLReader
- public class XMLReader
- extends java.io.PushbackInputStream
Parse an XML stream using a simple State Machine
- Author:
- (C) 1997 Phil Burk, All Rights Reserved
- See Also:
XMLListener
,
XMLPrinter
Constructor Summary |
XMLReader(java.io.InputStream stream)
|
Method Summary |
static double |
getAttribute(java.util.Hashtable attributes,
java.lang.String key,
double defaultValue)
Get a single attribute from the Hashtable. |
static int |
getAttribute(java.util.Hashtable attributes,
java.lang.String key,
int defaultValue)
Get a single attribute from the Hashtable. |
static long |
getAttribute(java.util.Hashtable attributes,
java.lang.String key,
long defaultValue)
Get a single attribute from the Hashtable. |
void |
parse()
|
void |
setXMLListener(XMLListener listener)
|
Methods inherited from class java.io.PushbackInputStream |
available, close, markSupported, read, read, skip, unread, unread, unread |
Methods inherited from class java.io.FilterInputStream |
mark, read, reset |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLReader
public XMLReader(java.io.InputStream stream)
setXMLListener
public void setXMLListener(XMLListener listener)
parse
public void parse()
throws java.io.IOException
getAttribute
public static int getAttribute(java.util.Hashtable attributes,
java.lang.String key,
int defaultValue)
- Get a single attribute from the Hashtable. Use the default if not found.
getAttribute
public static long getAttribute(java.util.Hashtable attributes,
java.lang.String key,
long defaultValue)
- Get a single attribute from the Hashtable. Use the default if not found.
getAttribute
public static double getAttribute(java.util.Hashtable attributes,
java.lang.String key,
double defaultValue)
- Get a single attribute from the Hashtable. Use the default if not found.