lucidsoftware / xtract   2.3.0

Apache License 2.0 GitHub

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

Scala versions: 2.13 2.12 2.11


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

Scaladocs for the specs2 extensions is available at


An example project using xtract can be found at