...
- A very basic Fragment Transformer written in Java.
- The Smooks configuration file.
- Executing the Smooks Transformation.
SVN - Download - Other Tutorials
To Build: "mvn clean install"
To Run: "mvn exec:java"
...
| No Format |
|---|
// Instantiate Smooks with the config...
Smooks smooks = new Smooks("smooks-config.xml);
//
Create an exec context - no profiles....
StandaloneExecutionContext executionContext = smooks.createExecutionContext();
// Filter the input message to the outputWriter, using the execution context...
smooks.filter(new StreamSource(messageInStream), new StreamResult(messageOutStream), executionContext);
|
Of course, you'd typically cache the Smooks instance.
...