lucidsoftware / xtract

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



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.0.0"

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.0.0" % "test"


The scaladoc API for the core functionality is available at

Scaladocs for the specs2 extensions is available at


An example project using xtract can be found at