Rather than explicitly doing `flatMap` and `map`, you can do this a bit more idiomatically using `for`-expressions:

    for {
      head <- xml.child find { _.label == "head" }
      title <- head.child find { _.label == "title" }
    } yield title.text

And probably shouldn't do the `getOrElse ""`, to avoid masking errors in the tests.