Code example for SAXSource

0
            StreamResult result = new StreamResult(System.out);
 
            // Set up the transformer to process the SAX events generated 
            // by the last filter in the chain 
            Transformer transformer = stf.newTransformer();
            SAXSource transformSource = new SAXSource(filter2, input);
            transformer.transform(transformSource, result);
        } catch (TransformerConfigurationException tce) {
            // Error generated by the parser 
            System.out.println("\n** Transformer Factory error");
            System.out.println("   " + tce.getMessage());
 
            // Use the contained exception, if any 
            Throwable x = tce;
 
            if (tce.getException() != null) {
                x = tce.getException();
            } 
 
            x.printStackTrace();
Stop searching for code, let great code find you!  Add Codota to your java IDE