automatic xml conversion in scala
- by Jeff Bowman
Let's say I have the following class:
class Person(val firstName:String, val lastName:String)
Is there an automatic way to generate xml from this class without having to hand create a toXml() method? Ideally the output would be something like:
<Person
<firstNameJohn</firstName
<lastNameSmith</lastName
</Person
It seems like there should be a way to do this without having to write all that out manually. Perhaps there is a trait I haven't found yet?