{ synchronized (base) { parser = new XmlParser (); if (namespaces) prefixStack = new NamespaceSupport (); else if (!xmlNames) throw new IllegalStateException (); parser.setHandler (this);  try {  Reader r = source.getCharacterStream(); InputStream in = source.getByteStream();   parser.doParse (source.getSystemId (), source.getPublicId (), r, in, source.getEncoding ()); } catch (SAXException e) { throw e; } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new SAXParseException (e.getMessage (), this, e); } finally { contentHandler.endDocument (); reset(); } } }
{ synchronized (base) { parser = new XmlParser(); if (namespaces) { prefixStack = new NamespaceSupport(); } else if (!xmlNames) { throw new IllegalStateException(); } parser.setHandler(this);  try { Reader r = source.getCharacterStream(); InputStream in = source.getByteStream();  parser.doParse(source.getSystemId(), source.getPublicId(), r, in, source.getEncoding()); } catch (SAXException e) { throw e; } catch (IOException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new SAXParseException(e.getMessage(), this, e); } finally { contentHandler.endDocument(); reset(); } } }
    public void parse (InputSource source)    throws SAXException, IOException    {	synchronized (base) {	    parser = new XmlParser ();	    if (namespaces)		prefixStack = new NamespaceSupport ();	    else if (!xmlNames)		throw new IllegalStateException ();	    parser.setHandler (this);	    try {	      Reader r = source.getCharacterStream();	      InputStream in = source.getByteStream();	      		parser.doParse (source.getSystemId (),			      source.getPublicId (),			      r,			      in,			      source.getEncoding ());	    } catch (SAXException e) {		throw e;	    } catch (IOException e) {		throw e;	    } catch (RuntimeException e) {		throw e;	    } catch (Exception e) {		throw new SAXParseException (e.getMessage (), this, e);	    } finally {		contentHandler.endDocument ();                reset();	    }	}    }