Code example for TransformerException

Methods: getMessage

0
        else printUsage(); 
      } 
      catch (TransformerException te) {
        // The TransformerException wraps someting other than a SAXParseException 
        // warning or error, either of which should be "caught" by the Handler. 
        System.out.println("Not a SAXParseException warning or error: " + te.getMessage());
      } 
 
      System.out.println("=====Done=====");
    } else 
      System.out.println("tfactory does not support SAX features!");
  } 
  private void printUsage (){ 
    System.err.println();
    System.err.println("Usage: java TransformUsingXMLSchema xmlDoc xsltDoc htmlDoc");
    System.err.println();
    System.err.println("xmlDoc:       The external URI location of an XML document to transform");
    System.err.println("xmlSchema: The external URI location of an XSL stylesheet");
    System.err.println("htmlDoc:      The external URI location to write the resultant HTML document");
    System.err.println("====================================================");
    System.exit(1);