Dashboard > Milyn > Home > Smooks
Smooks Log In | Sign Up   View a printable version of the current page.

Added by Tom Fennelly , last edited by Daniel Bevenius on Dec 11, 2007  (view change)
Labels: 
(None)

Smooks is a Java Framework/Engine for processing XML and non XML data (CSV, EDI, Java etc).

Smooks can be used to:

  • Perform a wide range of Data Transforms - XML to XML, CSV to XML, EDI to XML, XML to EDI, XML to CSV, Java to XML, Java to EDI, Java to CSV, Java to Java, XML to Java, EDI to Java etc.
  • Populate a Java Object Model from a data source (CSV, EDI, XML, Java etc). Populated object models can be used as a transformation result itself, or can be used by (e.g.) Templating resources for generating XML or other character based results. Also supports Virtual Object Models (Maps and Lists of typed data), which can be used by EL and Templating functionality.
  • Process huge messages (GBs) - Split, Transform and Route message fragments to JMS, File, Database etc destinations.
  • Enrich a message with data from a Database, or other Datasources.
  • Perform Extract Transform Load (ETL) operations by leveraging Smooks' Transformation, Routing and Persistence functionality.


Smooks supports both DOM and SAX processing models, but adds a more "code friendly" layer on top of them. It allows you to plug in your own "ContentHandler" implementations (written in Java or Groovy), or reuse the many existing handlers.

Smooks is an ideal fit as part of an overall Integration Solution.



Specialised analysis or transformation capabilities can be built on top of Smooks Core through the creation of a Smooks Cartridge.

Smooks Cartridges (Reusable Content Handlers)

The basic functionality of Smooks Core can be extended through the creation of what we call a "Smooks Cartridge". A Cartridge is simply a Java archive (jar) containing reusable Content Handlers (Visitor Logic). A Smooks Cartridge should provide "ready to use" support for a specific type of XML analysis or transformation.

Using Maven?

Name DOM Support SAX Support Description
JavaBean Enables population of Java Object Model from data embedded in
a data stream (XML, non XML, Java etc). See Tutorials. Download.
Templating  FreeMarker
 XSL
 StringTemplate
 FreeMarker
 XSL
 StringTemplate
Enables fragment-level templating using different templating solutions
e.g. FreeMarker, StringTemplate and XSLT. See Tutorials. Download.
Routing  File
 JMS
 Database
 File
 JMS
 Database
Enables routing of message fragments (including populated object models)
to a range of different destination types. See Tutorials. Download.
Scripting  Groovy  Groovy Enables fragment-level Transformation/Analysis using different
scripting languages. Currenly supports Groovy. See Tutorials. Download.
EDI Smooks Cartridge that converts an EDI message data stream
into a stream of SAX events. Download.
CSV Smooks Cartridge that converts a Comma Separated Value (CSV)
data stream into a stream of SAX events. Download.
Misc Contains miscellaneous resources for performing common analysis/transformation tasks
on an XML stream e.g. rename an element, delete an element, delete and attribute etc. Download.
Servlet Plugs Smooks into the J2EE Servlet Container. This allows Smooks to be
used for Servlet Response Analysis and Transformation e.g. to optimse the
Servlet Response for the requesting browser make/model. See Tutorials. Download.
CSS Makes Cascading Style Sheet (CSS) information easily available to web content
analysis or transformation logic. Supports linked or inline CSS Download.
Site running on a free Atlassian Confluence Open Source Project License granted to The Codehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007) - Bug/feature request - Contact Administrators