code: @Override
      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();
              }
          }
      }
docs: <b>SAX1, SAX2</b>: Auxiliary API to parse an XML document, used mostly
  when no URI is available. If you want anything useful to happen, you
  should set at least one type of handler.
  
  @param source
  The XML input source. Don't set 'encoding' unless you know for
  a fact that it's correct.
  @see #setEntityResolver
  @see #setDTDHandler
  @see #setContentHandler
  @see #setErrorHandler
  @exception SAXException
  The handlers may throw any SAXException, and the parser
  normally throws SAXParseException objects.
  @exception IOException
  IOExceptions are normally through through the parser if
  there are problems reading the source document.