A library to make it easy to deserialize XML to user types in scala


Build Status

Xtract is a scala library for deserializing XML. It is heavily inspired by the combinators in the Play JSON library, in particular the Reads[T] class.

See the introductory blog post.


To use Xtract in your sbt project add the following dependency:

"com.lucidchart" %% "xtract" % "2.2.1"

There is also an xtract-testing artifact which provides helpful matchers and other functions for use with specs2. To use in your test you can add the following sbt dependency:

"com.lucidchart" %% "xtract-testing" % "2.2.1" % "test"


The scaladoc API for the core functionality is available at http://lucidsoftware.github.io/xtract/core/api/com/lucidchart/open/xtract/index.html.

Scaladocs for the specs2 extensions is available at http://lucidsoftware.github.io/xtract/testing/api/com/lucidchart/open/xtract/index.html.


An example project using xtract can be found at http://github.com/lucidsoftware/xtract-example.