Code example for DocumentBuilder

Methods: parsesetErrorHandler

0
      } 
 
      parser.setFeature("http://apache.org/xml/features/allow-java-encodings", true); 
      */ 
 
      parser.setErrorHandler(
        new org.apache.xml.utils.DefaultErrorHandler()); 
 
      // if(null != m_entityResolver) 
      // { 
      // System.out.println("Setting the entity resolver."); 
      //  parser.setEntityResolver(m_entityResolver); 
      // } 
      setDocument(parser.parse(source));
    } 
    catch (org.xml.sax.SAXException se)
    { 
      throw new TransformerException(se);
    } 
    catch (ParserConfigurationException pce)