Thanks - I’ll go for CSV.
It’s a shame since XML does seem to give detail to the log. However, the scala XML library, as far as I’m aware, cannot save headers such as xsl details for xslt (it can do a DOCTYPE). You can if you read in the whole file, and then write out a string with these details prepended but this is a hassle. Having the xlst details and the xml data does what I need in one go.
But writing out an XHTML file should be easy given XML is in-built to scala.
For the file ops, does using a pattern such as:
def using[A <: { def close(): Unit }, B](resource: A)(f: A => B): B =
try {
f(resource)
} finally {
resource.close()
}
slow things down since you close a file or resource every time or is this better since its safer and doesn’t leave things open?
Also I have read that A <: SomeClass
is now not the preferred way. How would the above be written with the A : T
context-bound style?