XMLReader parent = XMLReaderFactory.createXMLReader();
XMLReader reader=null;   try { javax.xml.parsers.SAXParserFactory factory= javax.xml.parsers.SAXParserFactory.newInstance(); factory.setNamespaceAware( true ); javax.xml.parsers.SAXParser jaxpParser= factory.newSAXParser(); reader=jaxpParser.getXMLReader();  } catch( javax.xml.parsers.ParserConfigurationException ex ) { throw new org.xml.sax.SAXException( ex ); } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { throw new org.xml.sax.SAXException( ex1.toString() ); } catch( NoSuchMethodError ex2 ) { }  XMLReader parent; if( reader==null ) parent= XMLReaderFactory.createXMLReader(); else parent=reader;
  public void parse (InputSource input)    throws org.xml.sax.SAXException, IOException  {    if(null == getParent())    {      XMLReader parent = XMLReaderFactory.createXMLReader();      try      {        parent.setFeature("http://xml.org/sax/features/namespace-prefixes",                          true);        parent.setFeature("http://apache.org/xml/features/validation/dynamic",                          true);      }      catch (org.xml.sax.SAXException se){}      // setParent calls setupParse...      setParent(parent);    }    else    {      // Make sure everything is set up.      setupParse ();    }    if(null == m_transformer.getContentHandler())    {      throw new org.xml.sax.SAXException("parse can not be called if the ContentHandler has not been set!");    }    getParent().parse(input);    Exception e = m_transformer.getExceptionThrown();    if(null != e)    {      if(e instanceof org.xml.sax.SAXException)        throw (org.xml.sax.SAXException)e;      else        throw new org.xml.sax.SAXException(e);    }  }