This example illustrates how Smooks can be used to perform an XML to Java Transform. It also shows how the populated Object graph is then accessible outside Smooks via the JavaResult instance.
In reality, the Javabeans feature can be used as is (ala JAXB, XStream etc), or can be used to feed data into other fragment transforms e.g. Templating, Scripting or Java Transforms.
See:
- The "Main" class in src/main/java/example/Main.java.
- The input message in input-message.xml.
- The code in the src/main/java folder tree (.java).
- smooks-config.xml.
mvn clean package
mvn exec:exec