A ReadLine
can be used to specify the paths that should be used
to parse a field with an XmlReader defined with the XmlReader.makeReader
macro.
Define an XmlReader for type A
, inferring the types from primary
constructor of A
.
Define an XmlReader for type A
, inferring the types from primary
constructor of A
.
The type to create the XmlReader for.
There should be an implicit XmlReader in scope for the type of
each parameter to A
s primary constructor.
For a class defined like:
case class A(a: Int, b: String, c: Option[Double]) object A { implicit val reader = XmlReader.makeReader[A] }
the reader defined is equivalent to:
for { a <- (__ \ "a").read[Int] b <- (__ \ "b").read[String] c <- (__ \ "c").read[Option[Double]] } yield new A(a, b, c)
Define an XmlReader for type A
from a list of ReadLines.
Define an XmlReader for type A
from a list of ReadLines.