KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > xml > transform > TransformerConfigurationException

javax.xml.transform
Class TransformerConfigurationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.xml.transform.TransformerException
              extended by javax.xml.transform.TransformerConfigurationException
All Implemented Interfaces:
Serializable
See Also:
Top Examples, Source Code

public TransformerConfigurationException()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public TransformerConfigurationException(String msg)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public TransformerConfigurationException(String msg,
                                         Throwable e)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public TransformerConfigurationException(String message,
                                         SourceLocator locator)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public TransformerConfigurationException(String message,
                                         SourceLocator locator,
                                         Throwable e)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public TransformerConfigurationException(Throwable e)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1607]A simple console application to perform XSLT transformations
By Anonymous on 2005/11/04 20:23:08  Rate
import javax.xml.transform.*; 
 import javax.xml.transform.stream.*; 
  
  
 /** 
  * A simple console application to perform XSLT transformations. 
  */
 
  
  
 public class XMLTransformer  {  
   /** 
    * Application method creates a  < code > Transformer < /code >  based on the 
    * provided stylesheet, and uses it to transform the source into the result 
    * file. 
    *  
    * @param args 
    * First argument is source path. Second argument is stylesheet 
    * path. Third argument is result path. 
    */
 
   public static void main ( String [  ]  args )   {  
     if  ( args.length  <  3 )   {  
       System.out.println ( "Usage: java XMLTransformer " 
           + " < source XML >   < stylesheet >   < destination XML > " ) ; 
       System.exit ( -1 ) ; 
      }  
  
  
     try  {  
       TransformerFactory factory = TransformerFactory.newInstance (  ) ; 
       Transformer transformer = factory.newTransformer ( new StreamSource (  
           args [ 1 ]  )  ) ; 
       transformer.transform ( new StreamSource ( args [ 0 ]  ) , new StreamResult (  
           args [ 2 ]  )  ) ; 
      }  catch  ( TransformerConfigurationException e )   {  
       e.printStackTrace (  ) ; 
      }  catch  ( TransformerFactoryConfigurationError e )   {  
       e.printStackTrace (  ) ; 
      }  catch  ( TransformerException e )   {  
       e.printStackTrace (  ) ; 
      }  
  
  
    }  
  } 

Popular Tags