From 235e5eca1e51a378f1494b1e38525564622d4490 Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Fri, 20 Jul 2001 22:57:51 +0000 Subject: [PATCH] Moved XMLUtil to com.samskivert.xml.XMLUtil. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@94 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/miso/util/XMLUtil.java | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/java/com/threerings/miso/util/XMLUtil.java diff --git a/src/java/com/threerings/miso/util/XMLUtil.java b/src/java/com/threerings/miso/util/XMLUtil.java deleted file mode 100644 index cd424c75d..000000000 --- a/src/java/com/threerings/miso/util/XMLUtil.java +++ /dev/null @@ -1,44 +0,0 @@ -// -// $Id: XMLUtil.java,v 1.1 2001/07/20 08:08:59 shaper Exp $ - -package com.threerings.miso.util; - -import org.xml.sax.*; -import org.xml.sax.helpers.DefaultHandler; -import org.xml.sax.helpers.XMLReaderFactory; - -import java.io.*; -import javax.xml.parsers.*; - -/** - * The XMLUtil class provides a simplified interface for XML parsing. - * - *

Classes wishing to parse XML data need only extend the - * org.xml.sax.helpers.DefaultHandler class, override the - * desired methods, and then call XMLUtil.parse(). - */ -public class XMLUtil -{ - /** - * Parse the XML data in the given input stream, using the - * specified handler object as both the content and error handler. - */ - public static void parse (DefaultHandler handler, InputStream in) - throws IOException, ParserConfigurationException, SAXException - { - XMLReader xr = _pfactory.newSAXParser().getXMLReader(); - - xr.setContentHandler(handler); - xr.setErrorHandler(handler); - - xr.parse(new InputSource(in)); - } - - // the slithy tove from whence came the XMLReader object - protected static SAXParserFactory _pfactory; - - static { - _pfactory = SAXParserFactory.newInstance(); - _pfactory.setValidating(false); - } -}