com.samskivert.xml
Class XMLUtil

java.lang.Object
  extended by com.samskivert.xml.XMLUtil

public class XMLUtil
extends Object

The XMLUtil class provides a simplified interface for XML parsing.

Classes wishing to parse XML data should extend the org.xml.sax.helpers.DefaultHandler class, override the desired SAX event handler methods, and call XMLUtil.parse().


Field Summary
protected static SAXParserFactory _pfactory
          The factory from whence we obtain XMLReader objects
 
Constructor Summary
XMLUtil()
           
 
Method Summary
static void parse(DefaultHandler handler, InputStream in)
          Parse the XML data in the given input stream, using the specified handler object as both the content and error handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_pfactory

protected static SAXParserFactory _pfactory
The factory from whence we obtain XMLReader objects

Constructor Detail

XMLUtil

public XMLUtil()
Method Detail

parse

public static void parse(DefaultHandler handler,
                         InputStream in)
                  throws IOException,
                         ParserConfigurationException,
                         SAXException
Parse the XML data in the given input stream, using the specified handler object as both the content and error handler.

Parameters:
handler - the SAX event handler
in - the input stream containing the XML to be parsed
Throws:
IOException
ParserConfigurationException
SAXException


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.