IDE

Smooks v1.2

Smooks 1.1

Smooks 1.0

Examples

 
 Name  Keywords  Description
 xml-to-xml XML, FreeMarker,
 Mixing-DOM-&-SAX
This example illustrates how Smooks (in conjunction with FreeMarker) can be used to perform an XML to XML transformation. This example can be used as the basis for any character based transformation i.e. not just XML to XML
 java-to-xml  JavaSource, XML This example illustrates how Smooks can be used to transform a Java object graph to XML. It shows how to use a JavaSource to supply a Java object graph to Smooks for transformation.
 xml-to-java XML, JavaResultAn illustration of how Smooks can be used to extract data from an XML message, and use the data to populate an Object graph. It also shows how this Object graph is then accessible outside Smooks via the ExecutionContext.
 xslt-basic XSLTA very basic example that illustrates how Smooks can be used to apply an XSLT based transform on a message fragment.
 xslt-namespaces XML, XSLTA basic example that illustrates how Smooks can be used to apply an XSLT based transformation on a message fragment that contains namespaces.
 custom-java  Visitor A very basic example that illustrates How to write a custom message fragment Visitor in Java.
 groovy  Groovy, Mixing-DOM-&-SAX
This example illustrates how Smooks can be used in conjunction with Groovy to perform a Fragment based Transformation.
 java-to-java JavaSource, JavaResultThis example illustrates how Smooks can be used to transform one Java Object Graph to another Java Object Graph, without constructing any intermediate models.
 model-driven-basic
 XML, FreeMarker
Basic "Model Driven Transformation" using the Smooks Javabean and Templating Cartridges. The templating is done using FreeMarker.
 model-driven-basic-virtual XML, FreeMarker
This example is exactly the same as the "model-driven-basic" example except that it uses a "Virtual Model".
 csv-to-xml CSV, XMLAn example of how to configure Smooks to process a non-XML stream (CSV).
 edi-to-xml  EDI, XML
An example of how to configure Smooks to process a non-XML stream (EDI).
 edi-to-java  EDI, JavaResult
An example of how to configure Smooks to process a non-XML stream (EDI) and bind the data from that stream into Java Business Objects (Javabeans).
 profiling
 XML A simple example of how Smooks can be used to "profile" a set of messages, and so share transformation/analysis configurations across a message set.
 css This example illustrates how to use the Smooks CSS Cartridge to analyze the CSS components of a HTML document.
 servlet
 Servlet This example illustrates how to deploy Smooks in a Servlet Container and use it to perform useragent/browser specific transforms on a Servlet Response
 db-extract-transform-load This example illustrates how Smooks can be used to extract data from an EDI message and load this data into a database, all without writing a single line of code (except for the "Main" class that executes Smooks).
 split-transform-route-jms  Splitting, Transform, Routing,
 FreeMarker, JMS, Huge Messages
This example illustrates how Smooks can be used to split a message (XML in this case) and route the split messages to a JMS Queue.
 split-transform-route-file  Splitting, Transform, Routing,
 FreeMarker,OutputStreamResource,
 Huge Messages
This example illustrates how Smooks can be used to split a message (XML in this case) and route the split messages to file.
 

Maven

  • Adding Smooks Dependencies
  • Use "mvn site:site" to produce a readable dependency graph for each example.  This is a useful way of analysing the types of dependencies that Smooks will introduce.