java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.xml.transform.TransformerException
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.*;
public class XMLTransformer {
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 ( ) ;
}
}
}