All Examples  XML Examples  This Package 

Class examples.xml.http.RequestHandler

java.lang.Object
   |
   +----org.xml.sax.HandlerBase
           |
           +----examples.xml.http.RequestHandler

public class RequestHandler
extends HandlerBase
This class extends HandlerBase and is used to parse XML data using a SAX compliant parser. After parsing the document, getData() can be used to return a Hashtable representing the XML data.

Author:
Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Index

 o RequestHandler()
Default constructor.

Method Index

 o error(SAXParseException)
Error.
 o fatalError(SAXParseException)
Fatal error.
 o getData()
Returns parsed data as a vector of objects
 o parseXML(BufferedReader, String)
instantiates a parser, sets the document handler, and parses the BufferedReader
 o startDocument()
Start document.
 o startElement(String, AttributeList)
Start element.
 o warning(SAXParseException)
Warning.

Constructors

 o RequestHandler
 public RequestHandler()
Default constructor.

Methods

 o startDocument
 public void startDocument() throws SAXException
Start document.

Overrides:
startDocument in class HandlerBase
 o startElement
 public void startElement(String name,
                          AttributeList attrs) throws SAXException
Start element.

Overrides:
startElement in class HandlerBase
 o warning
 public void warning(SAXParseException ex)
Warning.

Overrides:
warning in class HandlerBase
 o error
 public void error(SAXParseException ex)
Error.

Overrides:
error in class HandlerBase
 o fatalError
 public void fatalError(SAXParseException ex) throws SAXException
Fatal error.

Overrides:
fatalError in class HandlerBase
 o parseXML
 public void parseXML(BufferedReader br,
                      String parserClass) throws IOException, SAXException, ClassNotFoundException, IllegalAccessException, InstantiationException, FileNotFoundException
instantiates a parser, sets the document handler, and parses the BufferedReader

 o getData
 public Hashtable getData()
Returns parsed data as a vector of objects


All Examples  XML Examples  This Package